685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
|
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
|
-
-
+
+
|
))
test-ids)))
;; get runs changed since last sync
;; (define (tasks:sync-test-data dbh cached-info area-info)
;; (let* ((
(define (tasks:sync-to-postgres configdat)
(let* ((dbh (pgdb:open configdat))
(define (tasks:sync-to-postgres configdat dest)
(let* ((dbh (pgdb:open configdat dbname: dest))
(area-info (pgdb:get-area-by-path dbh *toppath*))
(cached-info (make-hash-table))
(start (current-seconds)))
(for-each (lambda (dtype)
(hash-table-set! cached-info dtype (make-hash-table)))
'(runs targets tests))
(hash-table-set! cached-info 'start start) ;; when done we'll set sync times to this
|
709
710
711
712
713
714
715
716
717
718
719
720
|
709
710
711
712
713
714
715
716
717
718
719
720
|
-
+
|
(print "area-info: " area-info)
(if (not (null? test-ids))
(begin
(print "Syncing " (length test-ids) " changed tests")
(tasks:sync-tests-data dbh cached-info test-ids)))
(pgdb:write-sync-time dbh area-info start))
(if (tasks:set-area dbh configdat)
(tasks:sync-to-postgres configdat)
(tasks:sync-to-postgres configdat dest)
(begin
(debug:print 0 *default-log-port* "ERROR: unable to create an area record")
#f)))))
|