mirror of
https://github.com/penpot/penpot.git
synced 2025-05-12 07:26:39 +02:00
🔥 Remove executor internal dependency on http client module
This commit is contained in:
parent
ca6738d20c
commit
d241b73940
2 changed files with 4 additions and 6 deletions
|
@ -8,7 +8,6 @@
|
||||||
"Http client abstraction layer."
|
"Http client abstraction layer."
|
||||||
(:require
|
(:require
|
||||||
[app.common.spec :as us]
|
[app.common.spec :as us]
|
||||||
[app.worker :as wrk]
|
|
||||||
[clojure.spec.alpha :as s]
|
[clojure.spec.alpha :as s]
|
||||||
[integrant.core :as ig]
|
[integrant.core :as ig]
|
||||||
[java-http-clj.core :as http]
|
[java-http-clj.core :as http]
|
||||||
|
@ -21,12 +20,11 @@
|
||||||
(s/keys :req [::client]))
|
(s/keys :req [::client]))
|
||||||
|
|
||||||
(defmethod ig/pre-init-spec ::client [_]
|
(defmethod ig/pre-init-spec ::client [_]
|
||||||
(s/keys :req [::wrk/executor]))
|
(s/keys :req []))
|
||||||
|
|
||||||
(defmethod ig/init-key ::client
|
(defmethod ig/init-key ::client
|
||||||
[_ {:keys [::wrk/executor] :as cfg}]
|
[_ _]
|
||||||
(http/build-client {:executor executor
|
(http/build-client {:connect-timeout 30000 ;; 10s
|
||||||
:connect-timeout 30000 ;; 10s
|
|
||||||
:follow-redirects :always}))
|
:follow-redirects :always}))
|
||||||
|
|
||||||
(defn send!
|
(defn send!
|
||||||
|
|
|
@ -217,7 +217,7 @@
|
||||||
{::db/pool (ig/ref ::db/pool)}
|
{::db/pool (ig/ref ::db/pool)}
|
||||||
|
|
||||||
::http.client/client
|
::http.client/client
|
||||||
{::wrk/executor (ig/ref ::wrk/executor)}
|
{}
|
||||||
|
|
||||||
::session/manager
|
::session/manager
|
||||||
{::db/pool (ig/ref ::db/pool)}
|
{::db/pool (ig/ref ::db/pool)}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue