241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
|
(resdat (if (not (and read-only qry-is-write))
(api:execute-requests dbstruct-local (vector (symbol->string cmd) params))
(vector #t '())))
(success (vector-ref resdat 0))
(res (vector-ref resdat 1))
(duration (- (current-milliseconds) start)))
(if (and read-only qry-is-write)
(begin
(debug:print 0 *default-log-port* "ERROR: attempt to write to read-only database ignored. cmd=" cmd)
))
(if (not success)
(if (> remretries 0)
(begin
(debug:print-error 0 *default-log-port* "local query failed. Trying again.")
(thread-sleep! (/ (random 5000) 1000)) ;; some random delay
(rmt:open-qry-close-locally cmd run-id params remretries: (- remretries 1)))
(begin
|
<
|
<
|
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
|
(resdat (if (not (and read-only qry-is-write))
(api:execute-requests dbstruct-local (vector (symbol->string cmd) params))
(vector #t '())))
(success (vector-ref resdat 0))
(res (vector-ref resdat 1))
(duration (- (current-milliseconds) start)))
(if (and read-only qry-is-write)
(debug:print 0 *default-log-port* "ERROR: attempt to write to read-only database ignored. cmd=" cmd))
(if (not success)
(if (> remretries 0)
(begin
(debug:print-error 0 *default-log-port* "local query failed. Trying again.")
(thread-sleep! (/ (random 5000) 1000)) ;; some random delay
(rmt:open-qry-close-locally cmd run-id params remretries: (- remretries 1)))
(begin
|