Skip to content

Commit f81daa2

Browse files
isaacsandersmaennchen
authored andcommitted
feat: Handles task failures by returning a value
1 parent 7d97024 commit f81daa2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/quantum/executor.ex

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,13 @@ defmodule Quantum.Executor do
8484
"[#{inspect(Node.self())}][#{__MODULE__}] Execute started for job #{inspect(job_name)}"
8585
end)
8686

87-
result = execute_task(task)
87+
result =
88+
try do
89+
execute_task(task)
90+
catch
91+
type, value ->
92+
{type, value}
93+
end
8894

8995
debug_logging &&
9096
Logger.debug(fn ->

0 commit comments

Comments
 (0)