 
 (defprotocol IWorker (start [this]) (stop [this]))
 
-(defrecord Worker [conn qname running? opts]
+(defrecord Worker [conn qname running? dry-runs opts]
   IWorker
   (stop  [_] (let [stopped? @running?] (reset! running? false) stopped?))
   (start [_]
     (when-not @running?
       (reset! running? true)
+      (reset! dry-runs 0)
       (future
         (let [{:keys [handler throttle-ms eoq-backoff-ms]} opts
               qk    (partial qkey qname)

  (:require [clojure.string   :as str]
            [taoensso.carmine :as car :refer (wcar)]
            [taoensso.timbre  :as timbre]))

;;;; Implementation


                     considered fatally stalled and message re-queued. Must be
                     sufficiently high to prevent double handling.
   :eoq-backoff-ms - Thread sleep period each time end of queue is reached.
                     Can be a (fn [dry-run-count]) => ms. Sleep synchronized
                     between all queue workers.
   :throttle-ms    - Thread sleep period between each poll."
  [conn qname & [{:keys [handler lock-ms eoq-backoff-ms throttle-ms auto-start?]
                  :or   {handler (fn [{:keys [message attempt]}]
