Comparisons
Batch enqueue and batches
| Batch enqueue | Batches | |
|---|---|---|
| Edition | Core | Pro |
| Purpose | Store many jobs in one call | Run callbacks when a group of jobs finishes |
| API | enqueue_many in every SDK, POST /api/v1/sdk/jobs/batch (1 to 500 jobs) | JoobQPro::Batch (on_complete, on_success, on_failure), Crystal only |
| Afterwards | The jobs are independent | The batch tracks its members' outcomes |
See Batch enqueue and batches.
Unique-job modes
| Mode | Edition | Duplicate refused while | Frees on |
|---|---|---|---|
while_locked | Core | the TTL runs | the TTL (unique_ttl_ms, default 1 h) |
until_executing | Pro | the job waits to be claimed | the claim by a worker |
until_executed | Pro | the job waits or runs | its successful completion (a dead job keeps the lock until the TTL) |
See Unique jobs.
Queue throttling and rate limiting
| Queue throttling | Rate limiting | |
|---|---|---|
| Edition | Core | Pro |
| Applies to | A queue: claims of its tasks | Any key your code names |
| Who calls it | The server, when a worker polls | Your code, rate_limit(key, limit, period_ms) |
| Where it is set | The queue's JoobQ configuration ({limit, period}) | Each call |
| Effect | At most one claim per period / limit; a worker just gets fewer tasks | An answer {allowed, retry_after_ms}; nothing is delayed for you |
See Queue throttling and controls and Rate limiting.
Job schedules and workflow schedules
See Schedules: job schedules (Core) enqueue a job on a queue and are fired by the schedule runner; workflow schedules (Pro) start workflow runs and are fired by the engine's scheduler.