diff --git a/backend/src/app/worker/runner.clj b/backend/src/app/worker/runner.clj index ea8cd08cf2..d2b0204121 100644 --- a/backend/src/app/worker/runner.clj +++ b/backend/src/app/worker/runner.clj @@ -131,6 +131,11 @@ [{:keys [::id ::timeout] :as cfg} task-id scheduled-at] (loop [task (get-task cfg task-id)] (cond + (nil? task) + (l/wrn :hint "no task found on the database" + :runner-id id + :task-id task-id) + (ex/exception? task) (if (or (db/connection-error? task) (db/serialization-error? task)) @@ -153,11 +158,6 @@ :task-id task-id :runner-id id) - (nil? task) - (l/wrn :hint "no task found on the database" - :runner-id id - :task-id task-id) - :else (let [result (run-task cfg task)] (with-meta result