@@ -2015,10 +2015,15 @@ (db:multi-db-sync (db:setup) 'new2old ) (set! *didsomething* #t))) + +(if (args:get-arg "-sync-to-pg") + (let ((toppath (launch:setup))) + (tasks:sync-to-postgres *configdat*) + (set! *didsomething* #t))) (if (args:get-arg "-generate-html") (let* ((toppath (launch:setup))) (if (tests:create-html-tree #f) (debug:print-info 0 *default-log-port* "HTML output created in " toppath "/lt/page#.html") @@ -2028,11 +2033,13 @@ ;;====================================================================== ;; Exit and clean up ;;====================================================================== (if (not *didsomething*) - (debug:print 0 *default-log-port* help)) + (debug:print 0 *default-log-port* help) + (set! *time-to-exit* #t) + ) ;;(debug:print-info 13 *default-log-port* "thread-join! watchdog") ;; join the watchdog thread if it has been thread-start!ed (it may not have been started in the case of a server that never enters running state) ;; (symbols returned by thread-state: created ready running blocked suspended sleeping terminated dead) ;; TODO: for multiple areas, we will have multiple watchdogs; and multiple threads to manage