aboutsummaryrefslogtreecommitdiff
path: root/src/com/github/ivarref/yoltq.clj
diff options
context:
space:
mode:
authorIvar Refsdal <ivar.refsdal@nsd.no>2021-09-23 13:01:23 +0200
committerIvar Refsdal <ivar.refsdal@nsd.no>2021-09-23 13:01:23 +0200
commitdc2e14b4e1e91e6fefecc01c312a44c0033640c9 (patch)
treeca51f0e1830abc41672cc565487ddaaa3135ec89 /src/com/github/ivarref/yoltq.clj
parentDocument force-retry! (diff)
downloadfiinha-dc2e14b4e1e91e6fefecc01c312a44c0033640c9.tar.gz
fiinha-dc2e14b4e1e91e6fefecc01c312a44c0033640c9.tar.xz
Basic depends-on works for test queue
Diffstat (limited to 'src/com/github/ivarref/yoltq.clj')
-rw-r--r--src/com/github/ivarref/yoltq.clj12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/com/github/ivarref/yoltq.clj b/src/com/github/ivarref/yoltq.clj
index 58efca1..3164020 100644
--- a/src/com/github/ivarref/yoltq.clj
+++ b/src/com/github/ivarref/yoltq.clj
@@ -94,11 +94,13 @@
(swap! *config* (fn [old-config] (assoc-in old-config [:handlers queue-id] (merge opts {:f f}))))))
-(defn put [queue-id payload]
- (let [{:keys [bootstrap-poller! conn] :as cfg} @*config*]
- (when (and *test-mode* bootstrap-poller!)
- (bootstrap-poller! conn))
- (i/put cfg queue-id payload)))
+(defn put
+ ([queue-id payload] (put queue-id payload {}))
+ ([queue-id payload opts]
+ (let [{:keys [bootstrap-poller! conn] :as cfg} @*config*]
+ (when (and *test-mode* bootstrap-poller!)
+ (bootstrap-poller! conn))
+ (i/put cfg queue-id payload opts))))
(defn- do-start! []