Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions docs/develop/task-queue-priority-fairness.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ You can use Priority and Fairness individually or combine them to express Fairne

<EnlargeImage
src="/img/develop/task-queue-priority-fairness/priority-details.png"
alt="Detailed view of how Priority works"
alt="Flowchart of how Priority dispatches Tasks from highest to lowest priority queue"
/>

### When to use Priority
Expand Down Expand Up @@ -250,7 +250,7 @@ To use Fairness, you need to set fairness keys and optionally fairness weights a

<EnlargeImage
src="/img/develop/task-queue-priority-fairness/fairness-details.png"
alt="High-level of how fairness works"
alt="Flowchart of how Fairness selects a virtual queue weighted by fairness weight when the backlog has Tasks"
/>

You can set a Workflow's fairness key and weight via the CLI like so:
Expand Down Expand Up @@ -521,13 +521,18 @@ When you use Priority and Fairness together, Priority determines which "sub-queu

<EnlargeImage
src="/img/develop/task-queue-priority-fairness/priority-fairness.png"
alt="High-level of how priority and fairness work together"
alt="Flowchart of how Priority and Fairness combine: poller checks priority levels in order, then within each level Fairness selects a virtual queue weighted by fairness weight"
/>

### Inheritance

Each field of Priority (`priority_key`, `fairness_key`, `fairness_weight`) is resolved independently.

<EnlargeImage
src="/img/develop/task-queue-priority-fairness/inheritance.png"
alt="Flowchart of how a Priority field is resolved: check for a Task Queue weight override (fairness_weight only), then an explicit value, then inherit from the calling Workflow, otherwise use the default"
/>

**Activity inheritance order** (highest precedence first):

1. [Fairness weight overrides](#fairness-weight-overrides) on the Task Queue (`fairness_weight` only)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading