31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
;; )
;;======================================================================
;; S U P P O R T F U N C T I O N S
;;======================================================================
(define (rmt:call-transport run-id connection-info cmd jparams)
(case (server:get-transport)
((rpc) ( rpc-transport:client-api-send-receive run-id connection-info cmd jparams))
((http) (http-transport:client-api-send-receive run-id connection-info cmd jparams))
((fs) ( fs-transport:client-api-send-receive run-id connection-info cmd jparams))
((zmq) (zmq-transport:client-api-send-receive run-id connection-info cmd jparams))
(else ( rpc-transport:client-api-send-receive run-id connection-info cmd jparams))))
|
>
>
|
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
;; )
;;======================================================================
;; S U P P O R T F U N C T I O N S
;;======================================================================
;; NOT USED
;;
(define (rmt:call-transport run-id connection-info cmd jparams)
(case (server:get-transport)
((rpc) ( rpc-transport:client-api-send-receive run-id connection-info cmd jparams))
((http) (http-transport:client-api-send-receive run-id connection-info cmd jparams))
((fs) ( fs-transport:client-api-send-receive run-id connection-info cmd jparams))
((zmq) (zmq-transport:client-api-send-receive run-id connection-info cmd jparams))
(else ( rpc-transport:client-api-send-receive run-id connection-info cmd jparams))))
|
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
|
(hash-table-set! *db-local-sync* (or run-id 0) start-time) ;; the oldest "write"
(mutex-unlock! *db-multi-sync-mutex*)))
res)))
(define (rmt:send-receive-no-auto-client-setup connection-info cmd run-id params)
(let* ((run-id (if run-id run-id 0))
;; (jparams (db:obj->string params)) ;; (rmt:dat->json-str params))
(res (http-transport:client-api-send-receive run-id connection-info cmd params)))
(if (and res (vector-ref res 0))
res
#f)))
;; (db:string->obj (vector-ref dat 1))
;; (begin
;; (debug:print 0 "ERROR: rmt:send-receive-no-auto-client-setup failed, attempting to continue. Got " dat)
;; dat))))
|
>
|
>
|
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
|
(hash-table-set! *db-local-sync* (or run-id 0) start-time) ;; the oldest "write"
(mutex-unlock! *db-multi-sync-mutex*)))
res)))
(define (rmt:send-receive-no-auto-client-setup connection-info cmd run-id params)
(let* ((run-id (if run-id run-id 0))
;; (jparams (db:obj->string params)) ;; (rmt:dat->json-str params))
(res (condition-case
(http-transport:client-api-send-receive run-id connection-info cmd params)
((commfail)(vector #f "communications fail")))))
(if (and res (vector-ref res 0))
res
#f)))
;; (db:string->obj (vector-ref dat 1))
;; (begin
;; (debug:print 0 "ERROR: rmt:send-receive-no-auto-client-setup failed, attempting to continue. Got " dat)
;; dat))))
|