Skip to content

Commit 42b776d

Browse files
committed
increase frontend timeout when calling the API, fixes #62
1 parent 3719d62 commit 42b776d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/clj/xt_play/handler.clj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
(defn run-handler [{{body :body} :parameters :as request}]
6969
(log/debug "run-handler" request)
7070
(log/info :db-run body)
71+
#_(Thread/sleep 4000) ;; useful to confirm the front :db-run-opts timeout
7172
(if-let [result (txs/run!! body)]
7273
{:status 200
7374
:body result}

src/cljs/xt_play/model/run.cljs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{:method :post
1111
:uri "/beta-db-run"
1212
:params params
13-
:timeout 3000
13+
:timeout 30000 ;; timeout must be greater than the API cold start response time
1414
:format (ajax/json-request-format)
1515
:response-format (ajax/json-response-format {:keywords? true})
1616
:on-success [::request-success]

0 commit comments

Comments
 (0)