62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
(debug:print 0 "ERROR: failed to start or connect to server for run-id " run-id)
(exit 1))
(let ((host-info (hash-table-ref/default *runremote* run-id #f)))
(if host-info
(let* ((iface (car host-info))
(port (cadr host-info))
(start-res (http-transport:client-connect iface port))
(ping-res (server:ping-server run-id iface port)))
(if ping-res ;; sucessful login?
(begin
(hash-table-set! *runremote* run-id start-res)
start-res) ;; return the server info
(if (member remaining-tries '(3 4 6))
(begin ;; login failed
(debug:print 25 "INFO: client:setup start-res=" start-res ", run-id=" run-id ", server-dat=" host-info)
|
|
>
|
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
(debug:print 0 "ERROR: failed to start or connect to server for run-id " run-id)
(exit 1))
(let ((host-info (hash-table-ref/default *runremote* run-id #f)))
(if host-info
(let* ((iface (car host-info))
(port (cadr host-info))
(start-res (http-transport:client-connect iface port))
;; (ping-res (server:ping-server run-id iface port))
(ping-res (rmt:login-no-auto-client-setup server-dat run-id)))
(if ping-res ;; sucessful login?
(begin
(hash-table-set! *runremote* run-id start-res)
start-res) ;; return the server info
(if (member remaining-tries '(3 4 6))
(begin ;; login failed
(debug:print 25 "INFO: client:setup start-res=" start-res ", run-id=" run-id ", server-dat=" host-info)
|
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
(client:setup run-id remaining-tries: (- remaining-tries 1))))))
;; YUK: rename server-dat here
(let* ((server-dat (open-run-close tasks:get-server tasks:open-db run-id)))
(if server-dat
(let* ((iface (tasks:hostinfo-get-interface server-dat))
(port (tasks:hostinfo-get-port server-dat))
(start-res (http-transport:client-connect iface port))
(ping-res (server:ping-server run-id iface port)))
(if start-res
(begin
(hash-table-set! *runremote* run-id start-res)
start-res)
(if (member remaining-tries '(2 5))
(begin ;; login failed
(debug:print 25 "INFO: client:setup start-res=" start-res ", run-id=" run-id ", server-dat=" server-dat)
|
|
>
|
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
(client:setup run-id remaining-tries: (- remaining-tries 1))))))
;; YUK: rename server-dat here
(let* ((server-dat (open-run-close tasks:get-server tasks:open-db run-id)))
(if server-dat
(let* ((iface (tasks:hostinfo-get-interface server-dat))
(port (tasks:hostinfo-get-port server-dat))
(start-res (http-transport:client-connect iface port))
;; (ping-res (server:ping-server run-id iface port))
(ping-res (rmt:login-no-auto-client-setup start-res run-id)))
(if start-res
(begin
(hash-table-set! *runremote* run-id start-res)
start-res)
(if (member remaining-tries '(2 5))
(begin ;; login failed
(debug:print 25 "INFO: client:setup start-res=" start-res ", run-id=" run-id ", server-dat=" server-dat)
|