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 0cea03f commit 1fe45ba
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 @@ -343,7 +343,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 1fe45ba

Please sign in to comment.