From cc9cc0ed52ca2d4fa82f2fe7dc5f17e61ced26f4 Mon Sep 17 00:00:00 2001 From: Ivar Refsdal Date: Thu, 23 Sep 2021 13:12:12 +0200 Subject: Basic depends-on seems to work --- src/com/github/ivarref/yoltq/report_queue.clj | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/com/github/ivarref/yoltq/report_queue.clj') diff --git a/src/com/github/ivarref/yoltq/report_queue.clj b/src/com/github/ivarref/yoltq/report_queue.clj index c6559bf..20e0a93 100644 --- a/src/com/github/ivarref/yoltq/report_queue.clj +++ b/src/com/github/ivarref/yoltq/report_queue.clj @@ -21,10 +21,12 @@ (try (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)))) + (if (i/depends-on-waiting? cfg {:id id}) + nil + (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!"))))))))) -- cgit v1.2.3