aboutsummaryrefslogtreecommitdiff
path: root/src/com/github/ivarref/yoltq.clj
diff options
context:
space:
mode:
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! []