OXYGENHUB

Runners hand jobs back: POST /flow/jobs/{id}/release, and a lapsed lease requeues issue #312 closed: completed andymccall opened this · 0 comments

andymccall

The hub's half of oxygenflow#76 (docs/handover.md §6 in oxygenflow).

  • Release: POST /api/v1/flow/jobs/{id}/release {reason}: a draining runner hands back a job it holds (a phone leaving Wi-Fi, a host restarting, a spot reclaim). The job is queued again ahead of new work, its log says who handed it back and why, and its next attempt's log follows on. Not a decline: the runner is not held from it and it does not count towards unplaceable.
  • Leases: a job whose runner has not been heard from (claims, heartbeats, logs) for 3 minutes is handed back the same way, rather than running on until its time limit and ending as lost.
  • Bounded: a job handed back 5 times ends as an error saying so.
  • Claims say how long the job is expected to take on that runner's speed class, when the hub has learned it, so a draining runner can tell whether it can finish within its notice.

Migration 0094: flow_jobs.handed_back_ms, flow_jobs.handbacks.

andymccall set labels feature ·

closed by change ab4df6aae179 ·

andymccall referenced by change 234921ea0834 on main ·