aboutsummaryrefslogtreecommitdiff
path: root/src/com/github/ivarref/yoltq/report_queue.clj
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/github/ivarref/yoltq/report_queue.clj')
-rw-r--r--src/com/github/ivarref/yoltq/report_queue.clj11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/com/github/ivarref/yoltq/report_queue.clj b/src/com/github/ivarref/yoltq/report_queue.clj
index a40d29a..c6559bf 100644
--- a/src/com/github/ivarref/yoltq/report_queue.clj
+++ b/src/com/github/ivarref/yoltq/report_queue.clj
@@ -19,11 +19,12 @@
(doseq [id new-ids]
(consumer (fn []
(try
- (let [{:com.github.ivarref.yoltq/keys [lock id status queue-name]} (u/get-queue-item db-after id)]
- (some->>
- (u/prepare-processing id queue-name lock status)
- (i/take! cfg)
- (i/execute! cfg)))
+ (let [{:com.github.ivarref.yoltq/keys [lock id status queue-name bindings]} (u/get-queue-item db-after id)]
+ (with-bindings (or bindings {})
+ (some->>
+ (u/prepare-processing db-after id queue-name lock status)
+ (i/take! cfg)
+ (i/execute! cfg))))
(catch Throwable t
(log/error t "unexpected error in process-poll-result!")))))))))