retry_all_jobs/1 retrying successfully completed jobs
dmarkow opened this issue · comments
Dylan Markow commented
Environment
- Oban Version: 2.15.2
- PostgreSQL Version: 15.3
- Elixir & Erlang/OTP Versions (
elixir --version
): Elixir 1.15.2 (compiled with Erlang/OTP 26)
Current Behavior
I saw this code example in the docs, with the description "Retries all retryable jobs".
Oban.retry_all_jobs(Oban.Job)
{:ok, 9}
I ran this, and it re-ran a bunch of jobs from earlier today that absolutely had a state of completed
before I ran it.
Expected Behavior
I would expect only jobs with a state of retryable
to be retried?
Parker Selbert commented
I see your confusion. That function will retry any jobs that aren't actively available
or executing
. I'm updating the documentation to be clearer and show a more helpful example.