fix :request/attempts typo

This commit is contained in:
Roman Volosovskyi 2019-02-06 13:12:22 +02:00
parent c2409ad664
commit 2ab1dcb54a
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
2 changed files with 5 additions and 5 deletions

View File

@ -567,15 +567,15 @@
(fx/defn resend-request
[{:keys [db] :as cofx} {:keys [request-id]}]
(if (<= maximum-number-of-attempts
(get-in db [:mailserver/current-request :attemps]))
(get-in db [:mailserver/current-request :attempts]))
(fx/merge cofx
{:db (update db :mailserver/current-request dissoc :attemps)}
{:db (update db :mailserver/current-request dissoc :attempts)}
(change-mailserver))
(if-let [mailserver (get-mailserver-when-ready cofx)]
(let [{:keys [topics from to cursor limit] :as request} (get db :mailserver/current-request)
web3 (:web3 db)]
(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/request-messages {:web3 web3
:mailserver mailserver

View File

@ -21,7 +21,7 @@
(spec/def :request/from 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 :mailserver.topic/last-request pos-int?)
@ -38,6 +38,6 @@
(spec/def :mailserver/connection-checks pos-int?)
(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]
:opt-un [:request/attemps]))
:opt-un [:request/attempts]))
(spec/def :mailserver/pending-requests integer?)
(spec/def :mailserver/request-error string?)