Skip to content

Commit 2e8c0de

Browse files
committed
Document what higher/lower priority numbers mean in ActiveJob guide
Or rather, what they could mean. What to do with priority numbers is up to the adapter implementation. All adapters that support priority that I know of treat lower priority as more urgent: * Backburner * Delayed Job * Que * SolidQueue * GoodJob (in v4)
1 parent 5345b04 commit 2e8c0de

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

guides/source/active_job_basics.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,10 @@ You can also pass a `:priority` option to `set`:
357357
MyJob.set(priority: 50).perform_later(record)
358358
```
359359

360+
NOTE: If a lower priority number performs before or after a higher priority number depends on the
361+
adapter implementation. Refer to documentation of your backend for more information.
362+
Adapter authors are encouraged to treat a lower number as more important.
363+
360364
[`queue_with_priority`]: https://api.rubyonrails.org/classes/ActiveJob/QueuePriority/ClassMethods.html#method-i-queue_with_priority
361365

362366
Callbacks

0 commit comments

Comments
 (0)