aboutsummaryrefslogtreecommitdiff
path: root/src/com/github/ivarref/yoltq.clj
diff options
context:
space:
mode:
authorIvar Refsdal <refsdal.ivar@gmail.com>2023-03-20 12:24:00 +0100
committerIvar Refsdal <refsdal.ivar@gmail.com>2023-03-20 12:24:00 +0100
commite848610ac341db31b804644a7dfaaf98389469d5 (patch)
treec56f4e7d47e6c7315c65bfc0743b05cb41947688 /src/com/github/ivarref/yoltq.clj
parentRelease 0.2.63: Add support for :encode and :decode function. Add :partition-... (diff)
downloadfiinha-e848610ac341db31b804644a7dfaaf98389469d5.tar.gz
fiinha-e848610ac341db31b804644a7dfaaf98389469d5.tar.xz
Release 0.2.64: Allow for infinitive retries
Diffstat (limited to 'src/com/github/ivarref/yoltq.clj')
-rw-r--r--src/com/github/ivarref/yoltq.clj7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/github/ivarref/yoltq.clj b/src/com/github/ivarref/yoltq.clj
index 9ffb3ad..379d701 100644
--- a/src/com/github/ivarref/yoltq.clj
+++ b/src/com/github/ivarref/yoltq.clj
@@ -24,7 +24,10 @@
(-> {; Default number of times a queue job will be retried before giving up
; Can be overridden on a per-consumer basis with
; (yq/add-consumer! :q (fn [payload] ...) {:max-retries 200})
- :max-retries 100
+ ; If you want no limit on the number of retries, specify
+ ; the value `0`. That will set the effective retry limit to
+ ; 9223372036854775807 times.
+ :max-retries 10000
; Minimum amount of time to wait before a failed queue job is retried
:error-backoff-time (Duration/ofSeconds 5)
@@ -244,7 +247,7 @@
(defn retry-one-error! [qname]
(let [{:keys [handlers] :as cfg} @*config*
_ (assert (contains? handlers qname) "Queue not found")
- cfg (assoc-in cfg [:handlers qname :max-retries] Integer/MAX_VALUE)]
+ cfg (assoc-in cfg [:handlers qname :max-retries] Long/MAX_VALUE)]
(poller/poll-once! cfg qname :error)))
(defn retry-stats