Overview
Comment: | Added variable delay to keepgoing loop to account for time used in db sync |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
bf776753ca75c7667a90217a06fbea7c |
User & Date: | mrwellan on 2013-11-19 07:37:55 |
Other Links: | manifest | tags |
Context
2013-11-19
| ||
22:28 | Switched to faster db sync routine check-in: 5555ed8e38 user: matt tags: trunk | |
07:37 | Added variable delay to keepgoing loop to account for time used in db sync check-in: bf776753ca user: mrwellan tags: trunk | |
00:07 | fixes check-in: 42159f0a7d user: matt tags: trunk | |
Changes
Modified http-transport.scm from [a6b93a7de2] to [b6fc385799].
︙ | ︙ | |||
421 422 423 424 425 426 427 | (string->number tmo)) (* 60 60 (string->number tmo)) ;; default to three days (* 3 24 60 60))))) (debug:print-info 2 "server-timeout: " server-timeout ", server pid: " spid " on " iface ":" port) (let loop ((count 0)) ;; Use this opportunity to sync the inmemdb to db | > > > | > > > > > > | | 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 | (string->number tmo)) (* 60 60 (string->number tmo)) ;; default to three days (* 3 24 60 60))))) (debug:print-info 2 "server-timeout: " server-timeout ", server pid: " spid " on " iface ":" port) (let loop ((count 0)) ;; Use this opportunity to sync the inmemdb to db (let ((start-time (current-milliseconds)) (sync-time #f) (rem-time #f)) (if *inmemdb* (db:sync-to *inmemdb* *db*)) (set! sync-time (- (current-milliseconds) start-time)) (debug:print 0 "SYNC: time= " sync-time) (set! rem-time (quotient (- 4000 sync-time) 1000)) (if (and (< rem-time 4) (> rem-time 0)) (thread-sleep! rem-time))) ;; (thread-sleep! 4) ;; no need to do this very often (if (< count 1) ;; 3x3 = 9 secs aprox (loop (+ count 1))) ;; Check that iface and port have not changed (can happen if server port collides) (mutex-lock! *heartbeat-mutex*) (set! sdat *runremote*) |
︙ | ︙ |