mirror of
https://github.com/penpot/penpot.git
synced 2025-05-14 09:27:14 +02:00
✨ Remove executor dependency from awsns handlers
This commit is contained in:
parent
54341d5b22
commit
ca6738d20c
2 changed files with 4 additions and 6 deletions
|
@ -31,14 +31,13 @@
|
||||||
(defmethod ig/pre-init-spec ::routes [_]
|
(defmethod ig/pre-init-spec ::routes [_]
|
||||||
(s/keys :req [::http/client
|
(s/keys :req [::http/client
|
||||||
::main/props
|
::main/props
|
||||||
::db/pool
|
::db/pool]))
|
||||||
::wrk/executor]))
|
|
||||||
|
|
||||||
(defmethod ig/init-key ::routes
|
(defmethod ig/init-key ::routes
|
||||||
[_ {:keys [::wrk/executor] :as cfg}]
|
[_ cfg]
|
||||||
(letfn [(handler [request]
|
(letfn [(handler [request]
|
||||||
(let [data (-> request rreq/body slurp)]
|
(let [data (-> request rreq/body slurp)]
|
||||||
(px/run! executor #(handle-request cfg data)))
|
(px/run! :vthread (partial handle-request cfg data)))
|
||||||
{::rres/status 200})]
|
{::rres/status 200})]
|
||||||
["/sns" {:handler handler
|
["/sns" {:handler handler
|
||||||
:allowed-methods #{:post}}]))
|
:allowed-methods #{:post}}]))
|
||||||
|
|
|
@ -228,8 +228,7 @@
|
||||||
::http.awsns/routes
|
::http.awsns/routes
|
||||||
{::props (ig/ref ::setup/props)
|
{::props (ig/ref ::setup/props)
|
||||||
::db/pool (ig/ref ::db/pool)
|
::db/pool (ig/ref ::db/pool)
|
||||||
::http.client/client (ig/ref ::http.client/client)
|
::http.client/client (ig/ref ::http.client/client)}
|
||||||
::wrk/executor (ig/ref ::wrk/executor)}
|
|
||||||
|
|
||||||
::http/server
|
::http/server
|
||||||
{::http/port (cf/get :http-server-port)
|
{::http/port (cf/get :http-server-port)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue