Priority and aging
When an agent has a free slot, the controller gives it the queued job with the highest score.
The score
score = priority + (minutes waiting × boost_per_minute)priority comes from the org or repo entry in agent.yaml. Minutes waiting count from the time GitHub queued the job. When two jobs have the same score, the job that waited longer goes first.
The controller considers only jobs whose runs-on labels the agent has. It never offers the same job twice.
Set priority
orgs:
- name: acme-eng
priority: 200
- name: acme-labs
priority: 100Higher wins. ushr setup sets 100, or the value of --priority.
On the hosted plane, a workspace admin can also set a priority for each verified org or repo on the workspace page. That value replaces the agent.yaml value for the scope on every host. Clear it to use the agent.yaml value again.
Aging
Aging stops a high-priority org from blocking a lower one forever. Each minute of waiting adds boost_per_minute points. Set it in controller.yaml:
policy:
type: priority
aging:
boost_per_minute: 1| policy.type | priority is the only policy. |
| policy.aging.boost_per_minute | Points added per full minute of waiting. 0 turns aging off. |
Example: with a boost of 1, an acme-labs job that waited 100 minutes scores 200. It ties with a new acme-eng job and wins the tie because it waited longer.