Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -662,22 +662,21 @@ (let* ((fname (conc (pathname-file file) ".db")) (fulln (conc *toppath*"/.megatest/"fname)) (time1 (if (file-exists? file) (file-modification-time file) (begin - (debug:print-info 0 *default-log-port* "Sync - I do not see file "file) + (debug:print-info 2 *default-log-port* "Sync - I do not see file "file) 1))) (time2 (if (file-exists? fulln) (file-modification-time fulln) (begin - (debug:print-info 0 *default-log-port* "Sync - I do not see file "fulln) + (debug:print-info 2 *default-log-port* "Sync - I do not see file "fulln) 0))) - ;; (changed (> time1 time2)) - (changed ( < (- time2 time1) 6.0)) ;; dest db not updated within last 6 seconds + (changed (> time1 time2)) (do-cp (cond ((not (file-exists? fulln)) ;; shouldn't happen, but this might recover - (debug:print-info 0 *default-log-port* "File "fulln" not found! Copying "fname" to "fulln) + (debug:print-info 2 *default-log-port* "File "fulln" not found! Copying "fname" to "fulln) #t) (changed ;; (and changed ;; (> (- (current-seconds) time1) 3)) ;; if file is changed and three seconds have passed. #t) ((and changed *time-to-exit*) ;; last sync Index: runs.scm ================================================================== --- runs.scm +++ runs.scm @@ -323,11 +323,11 @@ (let* ((last-time (hash-table-ref/default *too-soon-delays* key #f))) (if (and last-time (< (- (current-seconds) last-time) dseconds)) (begin (if (runs:lownoise (conc "too-soon-delay"key) 60) - (debug:print-info 0 *default-log-port* "Polling throttle for "key)) + (debug:print-info 2 *default-log-port* "Polling throttle for "key)) (thread-sleep! wseconds))) (hash-table-set! *too-soon-delays* key (current-seconds)))) (define (runs:can-run-more-tests runsdat run-id jobgroup max-concurrent-jobs) @@ -1671,10 +1671,11 @@ (debug:print-info 2 *default-log-port* "Excessively fast loop, delaying 1/2 second")) (thread-sleep! 0.5))) (set! *last-loop-time-ms* (current-milliseconds)) (runs:dat-regfull-set! runsdat regfull) + (if (> (- (current-seconds) *last-test-launch*) 5) ;; be pretty aggressive for five seconds after (runs:too-soon-delay (conc "loop delay " hed) 1 0.6) ;; starting a test then apply more delay (runs:too-soon-delay (conc "loop delay " hed) 1 0.1)) Index: server.scm ================================================================== --- server.scm +++ server.scm @@ -569,10 +569,12 @@ (if (equal? *toppath* toppath) #t #f))) ;; timeout is hms string: 1h 5m 3s, default is 1 minute +;; This is currently broken. Just use the number of hours with no unit. +;; Default is 60 seconds. ;; (define (server:expiration-timeout) (let ((tmo (configf:lookup *configdat* "server" "timeout"))) (if (and (string? tmo) (common:hms-string->seconds tmo)) ;; BUG: hms-string->seconds is broken, if given "10" returns 0. Also, it doesn't belong in this logic unless the string->number is changed below