Skip to content

Commit

Permalink
Return {:ok, job} tuple on adlock conflict
Browse files Browse the repository at this point in the history
The advisory lock clause only returned the job, not a success tuple.

Closes #1112
  • Loading branch information
sorentwo committed Jun 28, 2024
1 parent fb07db6 commit 1996be9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/oban/engines/basic.ex
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ defmodule Oban.Engines.Basic do
else
{:error, :locked} ->
with {:ok, job} <- Changeset.apply_action(changeset, :insert) do
%Job{job | conflict?: true}
{:ok, %Job{job | conflict?: true}}
end

nil ->
Expand Down

0 comments on commit 1996be9

Please sign in to comment.