diff options
| author | Ivar Refsdal <ivar.refsdal@nsd.no> | 2021-09-17 14:25:08 +0200 |
|---|---|---|
| committer | Ivar Refsdal <ivar.refsdal@nsd.no> | 2021-09-17 14:25:08 +0200 |
| commit | ad8a41bd7d9e6fed77f633a75ef36410b7afbef1 (patch) | |
| tree | 6ddc2760f1bb6ab3abd88cfef428a161b28da875 /src/com/github/ivarref/yoltq/report_queue.clj | |
| parent | Save bindings on put (diff) | |
| download | fiinha-ad8a41bd7d9e6fed77f633a75ef36410b7afbef1.tar.gz fiinha-ad8a41bd7d9e6fed77f633a75ef36410b7afbef1.tar.xz | |
Start add bindings ...
Diffstat (limited to 'src/com/github/ivarref/yoltq/report_queue.clj')
| -rw-r--r-- | src/com/github/ivarref/yoltq/report_queue.clj | 11 |
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!"))))))))) |
