364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
|
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
|
-
-
-
+
+
+
+
+
+
|
(else
(debug:print 0 *default-log-port* "ERROR: bad api call " cmd)
(conc "ERROR: BAD api call " cmd))))))
;; save all stats
(let ((delta-t (- (current-milliseconds)
start-t)))
(hash-table-set! *db-api-call-time* cmd
(cons delta-t (hash-table-ref/default *db-api-call-time* cmd '()))))
start-t))
(modified-cmd (if (eq? cmd 'general-call)
(string->symbol (conc "general-call-" (car params)))
cmd)))
(hash-table-set! *db-api-call-time* modified-cmd
(cons delta-t (hash-table-ref/default *db-api-call-time* modified-cmd '()))))
(if writecmd-in-readonly-mode
(begin
#;(common:telemetry-log (conc "api-out:"(->string cmd))
payload: `((params . ,params)
(ok-res . #t)))
(vector #f res))
(begin
|