201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
|
(client:setup run-id remaining-tries: (- remaining-tries 1))
)))
(begin ;; no server registered
;; (let ((num-available (tasks:num-in-available-state (db:dbdat-get-db tdbdat) run-id)))
;; (debug:print-info 0 "client:setup, no server registered, remaining-tries=" remaining-tries " num-available=" num-available)
;; (if (< num-available 2)
;; (server:try-running run-id))
(tasks:start-and-wait-for-server tdbdat run-id delay-max-tries)
;; (thread-sleep! (+ 2 (random (- 20 remaining-tries)))) ;; give server a little time to start up, randomize a little to avoid start storms.
(client:setup run-id remaining-tries: (- remaining-tries 1))))))))
;; keep this as a function to ease future
(define (client:start run-id server-info)
(http-transport:client-connect (tasks:hostinfo-get-interface server-info)
(tasks:hostinfo-get-port server-info)))
|
|
|
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
|
(client:setup run-id remaining-tries: (- remaining-tries 1))
)))
(begin ;; no server registered
;; (let ((num-available (tasks:num-in-available-state (db:dbdat-get-db tdbdat) run-id)))
;; (debug:print-info 0 "client:setup, no server registered, remaining-tries=" remaining-tries " num-available=" num-available)
;; (if (< num-available 2)
;; (server:try-running run-id))
(tasks:start-and-wait-for-server tdbdat run-id 10)
;; (thread-sleep! (+ 2 (random (- 20 remaining-tries)))) ;; give server a little time to start up, randomize a little to avoid start storms.
(client:setup run-id remaining-tries: (- remaining-tries 1))))))))
;; keep this as a function to ease future
(define (client:start run-id server-info)
(http-transport:client-connect (tasks:hostinfo-get-interface server-info)
(tasks:hostinfo-get-port server-info)))
|