Skip to content

Commit 5e200cd

Browse files
committed
add some delay to requests
1 parent 0613d72 commit 5e200cd

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

catacumba-app/src/catacumba_app/routes.clj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
(defn hello-handler
77
[context]
8+
(Thread/sleep 1000)
89
"hello world")
910

1011
(defn routes [base]

luminus-app/src/clj/luminus_app/routes/services.clj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
[compojure.api.sweet :refer :all]
44
[schema.core :as s]))
55

6+
7+
(defn hello-handler []
8+
(Thread/sleep 1000)
9+
"hello world")
10+
611
(defapi service-routes
712
{:swagger {:ui "/swagger-ui"
813
:spec "/swagger.json"
@@ -11,4 +16,4 @@
1116
:description "Sample Services"}}}}
1217

1318
(GET "/" []
14-
(ok "hello world")))
19+
(ok (hello-handler))))

yada-app/src/yada_app/routes.clj

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,14 @@
22
(:require [yada.yada :as yada]))
33

44

5+
6+
(defn hello-handler [ctx]
7+
(Thread/sleep 1000)
8+
"hello world")
9+
10+
511
(defn routes [base]
612
[base
713
[
8-
["" (yada/as-resource "hello world")]
14+
["" (yada/as-resource hello-handler)]
915
[true (yada/as-resource nil)]]])

0 commit comments

Comments
 (0)