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/impl.clj | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/com/github/ivarref/yoltq/impl.clj') diff --git a/src/com/github/ivarref/yoltq/impl.clj b/src/com/github/ivarref/yoltq/impl.clj index 9811c93..a315545 100644 --- a/src/com/github/ivarref/yoltq/impl.clj +++ b/src/com/github/ivarref/yoltq/impl.clj @@ -60,9 +60,9 @@ (defn depends-on-waiting? [{:keys [conn]} - {:keys [id]}] + q-item] (let [db (d/db conn)] - (when-let [{:com.github.ivarref.yoltq/keys [opts]} (u/get-queue-item db id)] + (when-let [{:com.github.ivarref.yoltq/keys [opts]} (u/get-queue-item db (:id q-item))] (when-let [[q id :as depends-on] (:depends-on opts)] (when-not (d/q '[:find ?e . :in $ ?ext-id @@ -71,6 +71,7 @@ [?e :com.github.ivarref.yoltq/status :done]] db (pr-str [q id])) + (log/info "queue item" (str (:id q-item)) "is waiting on" depends-on) {:depends-on depends-on}))))) -- cgit v1.2.3