mirror of
https://github.com/penpot/penpot.git
synced 2025-12-12 06:24:17 +01:00
💄 Check the runner task exists as first condition
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user