52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
;; ((zmq) (zmq:client-connect iface port))
;; (else (rpc:client-connect iface port))))
(define (client:setup run-id #!key (remaining-tries 10))
(debug:print-info 2 *default-log-port* "client:setup remaining-tries=" remaining-tries)
(let* ((server-dat (tasks:bb-get-server-info run-id))
(transport (if server-dat (string->symbol (tasks:hostinfo-get-transport server-dat)) 'noserver)))
;;(BB> "transport >"transport"< string? transport >"(string? transport)"< symbol? transport >"(symbol? transport)"<")
(case transport
((noserver) ;; no server registered
(if (<= remaining-tries 0)
(begin
(debug:print-error 0 *default-log-port* "failed to start or connect to server for run-id " run-id)
(exit 1))
(begin
|
|
|
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
;; ((zmq) (zmq:client-connect iface port))
;; (else (rpc:client-connect iface port))))
(define (client:setup run-id #!key (remaining-tries 10))
(debug:print-info 2 *default-log-port* "client:setup remaining-tries=" remaining-tries)
(let* ((server-dat (tasks:bb-get-server-info run-id))
(transport (if server-dat (string->symbol (tasks:hostinfo-get-transport server-dat)) 'noserver)))
(case transport
((noserver) ;; no server registered
(if (<= remaining-tries 0)
(begin
(debug:print-error 0 *default-log-port* "failed to start or connect to server for run-id " run-id)
(exit 1))
(begin
|