Skip to content

Job priority

Preview

This feature is not subject to our service terms. Pre-GA features are available as is and might have limited support.

Your application can prioritze certain jobs over others of the same job type and increase chances that these jobs will be processed next.

When to use it

A pipeline maintains one queue for every job type. All enqueued jobs of the same job type wait in the same queue.

By default, the pipeline will try to prefer jobs in this queue

  1. that have a higher priority value,
  2. and among jobs with the same priority the jobs that have been created earlier, i.e. that have the lowest createTime value.

Important

In queues with high Job dispatch rate this is an approximate and may show some inconsistencies for individual jobs. In queues with a low Job dispatch rate the sequence typically will be strongly consistent with the priority and createTime.

The priority or createTime of jobs in other job type queues or other pipelines DO NOT impact which jobs are dispatched next.

Schema

priority: integer optional

Priority of the job request. Jobs with a greater priority value are more likely to be processed before any jobs with a lower priority, even if the job with the higher priority value was requested after a lower priority job or would expire after it.

default: 50 min: 0 max: 100

Note

The priority value of a job CANNOT be altered.

Examples

{
  "payload": {
    ...
  },
  "priority": 75
}