sorentwo / oban

💎 Robust job processing in Elixir, backed by modern PostgreSQL and SQLite3

Home Page:https://getoban.pro

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

retry_all_jobs/1 retrying successfully completed jobs

dmarkow opened this issue · comments

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?

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.