fix :request/attempts typo
This commit is contained in:
parent
c2409ad664
commit
2ab1dcb54a
|
@ -567,15 +567,15 @@
|
||||||
(fx/defn resend-request
|
(fx/defn resend-request
|
||||||
[{:keys [db] :as cofx} {:keys [request-id]}]
|
[{:keys [db] :as cofx} {:keys [request-id]}]
|
||||||
(if (<= maximum-number-of-attempts
|
(if (<= maximum-number-of-attempts
|
||||||
(get-in db [:mailserver/current-request :attemps]))
|
(get-in db [:mailserver/current-request :attempts]))
|
||||||
(fx/merge cofx
|
(fx/merge cofx
|
||||||
{:db (update db :mailserver/current-request dissoc :attemps)}
|
{:db (update db :mailserver/current-request dissoc :attempts)}
|
||||||
(change-mailserver))
|
(change-mailserver))
|
||||||
(if-let [mailserver (get-mailserver-when-ready cofx)]
|
(if-let [mailserver (get-mailserver-when-ready cofx)]
|
||||||
(let [{:keys [topics from to cursor limit] :as request} (get db :mailserver/current-request)
|
(let [{:keys [topics from to cursor limit] :as request} (get db :mailserver/current-request)
|
||||||
web3 (:web3 db)]
|
web3 (:web3 db)]
|
||||||
(log/info "mailserver: message request " request-id "expired for mailserver topic" topics "from" from "to" to "cursor" cursor "limit" (decrease-limit))
|
(log/info "mailserver: message request " request-id "expired for mailserver topic" topics "from" from "to" to "cursor" cursor "limit" (decrease-limit))
|
||||||
{:db (update-in db [:mailserver/current-request :attemps] inc)
|
{:db (update-in db [:mailserver/current-request :attempts] inc)
|
||||||
:mailserver/set-limit (decrease-limit)
|
:mailserver/set-limit (decrease-limit)
|
||||||
:mailserver/request-messages {:web3 web3
|
:mailserver/request-messages {:web3 web3
|
||||||
:mailserver mailserver
|
:mailserver mailserver
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
(spec/def :request/from pos-int?)
|
(spec/def :request/from pos-int?)
|
||||||
(spec/def :request/to pos-int?)
|
(spec/def :request/to pos-int?)
|
||||||
(spec/def :request/attemps int?)
|
(spec/def :request/attempts int?)
|
||||||
(spec/def :request/cursor :global/not-empty-string)
|
(spec/def :request/cursor :global/not-empty-string)
|
||||||
|
|
||||||
(spec/def :mailserver.topic/last-request pos-int?)
|
(spec/def :mailserver.topic/last-request pos-int?)
|
||||||
|
@ -38,6 +38,6 @@
|
||||||
(spec/def :mailserver/connection-checks pos-int?)
|
(spec/def :mailserver/connection-checks pos-int?)
|
||||||
(spec/def :mailserver/topics (spec/map-of :global/not-empty-string :mailserver/topic))
|
(spec/def :mailserver/topics (spec/map-of :global/not-empty-string :mailserver/topic))
|
||||||
(spec/def :mailserver/current-request (spec/keys :req-un [:request/from :request/to ::topics]
|
(spec/def :mailserver/current-request (spec/keys :req-un [:request/from :request/to ::topics]
|
||||||
:opt-un [:request/attemps]))
|
:opt-un [:request/attempts]))
|
||||||
(spec/def :mailserver/pending-requests integer?)
|
(spec/def :mailserver/pending-requests integer?)
|
||||||
(spec/def :mailserver/request-error string?)
|
(spec/def :mailserver/request-error string?)
|
||||||
|
|
Loading…
Reference in New Issue