413
414
415
416
417
418
419
420
421
422
423
424
425
426
|
(mutex-lock! *heartbeat-mutex*)
(set! last-access *last-db-access*)
(mutex-unlock! *heartbeat-mutex*)
;; (debug:print 11 "last-access=" last-access ", server-timeout=" server-timeout)
;;
;; no_traffic, no running tests, if server 0, no running servers
;;
(if (and *server-run*
(or (> (+ last-access server-timeout)
(current-seconds))
(and (eq? run-id 0)
(> (tasks:num-servers-non-zero-running tdb) 0))
(and (not (eq? run-id 0)) ;; only makes sense in non-zero run-id servers
|
>
>
|
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
|
(mutex-lock! *heartbeat-mutex*)
(set! last-access *last-db-access*)
(mutex-unlock! *heartbeat-mutex*)
;; (debug:print 11 "last-access=" last-access ", server-timeout=" server-timeout)
;;
;; no_traffic, no running tests, if server 0, no running servers
;;
;; (let ((wait-on-running (configf:lookup *configdat* "server" "wait-on-running"))) ;; wait on running tasks (if not true then exit on time out)
;;
(if (and *server-run*
(or (> (+ last-access server-timeout)
(current-seconds))
(and (eq? run-id 0)
(> (tasks:num-servers-non-zero-running tdb) 0))
(and (not (eq? run-id 0)) ;; only makes sense in non-zero run-id servers
|