2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
|
(let ((toppath (launch:setup)))
(tasks:sync-to-postgres *configdat* (args:get-arg "-sync-to"))
(set! *didsomething* #t)))
;; use with -from and -to
;;
(if (args:get-arg "-db2db")
(let* ((duh (launch:setup))
(src-db (args:get-arg "-from"))
(dest-db (args:get-arg "-to"))
(lockfile (conc dest-db".lock"))
;; (locked (common:simple-file-lock lockfile))
(keys (db:get-keys #f))
(res ;; (if locked
(dbmod:db-to-db-sync src-db dest-db 0 (dbfile:db-init-proc) keys)
;; #f)))
))
(if (and src-db dest-db)
(begin
(debug:print-info 0 *default-log-port* "Attempting to sync data from "src-db" to "dest-db"...")
(if res
(begin
(common:simple-file-release-lock lockfile)
|
|
|
|
>
>
|
|
|
|
|
|
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
|
(let ((toppath (launch:setup)))
(tasks:sync-to-postgres *configdat* (args:get-arg "-sync-to"))
(set! *didsomething* #t)))
;; use with -from and -to
;;
(if (args:get-arg "-db2db")
(let* ((duh (launch:setup))
(src-db (args:get-arg "-from"))
(dest-db (args:get-arg "-to"))
(sync-period (args:get-arg "-period")) ;; NOT IMPLEMENTED YET
(sync-timeout (args:get-arg "-timeout")) ;; NOT IMPLEMENTED YET
(lockfile (conc dest-db".lock"))
;; (locked (common:simple-file-lock lockfile))
(keys (db:get-keys #f))
(res ;; (if locked
(dbmod:db-to-db-sync src-db dest-db 0 (dbfile:db-init-proc) keys)
;; #f)))
))
(if (and src-db dest-db)
(begin
(debug:print-info 0 *default-log-port* "Attempting to sync data from "src-db" to "dest-db"...")
(if res
(begin
(common:simple-file-release-lock lockfile)
|