gets current scripts

This commit is contained in:
2026-08-28 12:23:22 +02:00
parent 2f92328461
commit bfeff94be7
3 changed files with 11 additions and 10 deletions
+2
View File
@@ -0,0 +1,2 @@
#!/bin/bash
racket -e "(require \"get-current-scripts.rkt\") (read-all)"
+8 -9
View File
@@ -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 -1
View File
@@ -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();