gets current scripts
This commit is contained in:
Executable
+2
@@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
racket -e "(require \"get-current-scripts.rkt\") (read-all)"
|
||||||
Regular → Executable
+8
-9
@@ -4,6 +4,8 @@
|
|||||||
racket/string
|
racket/string
|
||||||
)
|
)
|
||||||
|
|
||||||
|
(provide read-all)
|
||||||
|
|
||||||
(define crm-cfg-file (build-path (find-system-path 'home-dir) "crm" "data" "config-internal.php"))
|
(define crm-cfg-file (build-path (find-system-path 'home-dir) "crm" "data" "config-internal.php"))
|
||||||
|
|
||||||
(define (read-db-config)
|
(define (read-db-config)
|
||||||
@@ -67,6 +69,7 @@
|
|||||||
(string-append (string-replace name "/" "-") "." ext))))
|
(string-append (string-replace name "/" "-") "." ext))))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
(displayln (format "making ~a / ~a" dir name))
|
||||||
(to-file (mk-name name "id") id)
|
(to-file (mk-name name "id") id)
|
||||||
(to-file (mk-name name "js") value_script)
|
(to-file (mk-name name "js") value_script)
|
||||||
(to-file (mk-name name "descr") description)
|
(to-file (mk-name name "descr") description)
|
||||||
@@ -81,13 +84,9 @@
|
|||||||
(let ((rows (query-rows dbh "select id, name, description, formule from script where deleted = 0")))
|
(let ((rows (query-rows dbh "select id, name, description, formule from script where deleted = 0")))
|
||||||
(handle-rows "scripts" rows)))
|
(handle-rows "scripts" rows)))
|
||||||
|
|
||||||
|
(define (read-all)
|
||||||
|
(let ((dbh (apply connect-db (read-db-config))))
|
||||||
|
(read-script-configs dbh)
|
||||||
|
(read-scripts dbh))
|
||||||
|
)
|
||||||
|
|
||||||
;(displayln (read-db-config))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// last execution: 2026-08-28 10:17:02
|
// last execution: 2026-08-28 10:23:01
|
||||||
$cfg = ConfigGet('job-test');
|
$cfg = ConfigGet('job-test');
|
||||||
log('warning', 'JobTest: Current value for config job-test:', $cfg);
|
log('warning', 'JobTest: Current value for config job-test:', $cfg);
|
||||||
$cfg = datetime\now();
|
$cfg = datetime\now();
|
||||||
|
|||||||
Reference in New Issue
Block a user