Home Assistant leases the next Job #144

Open
opened 2026-11-27 16:44:00 -05:00 by bobby · 0 comments
Owner

Part of #73 (spec: #72)

What to build

GET /v1/smart_home/jobs/next returns the oldest eligible Job (FIFO by not_before or creation; not leased, not expired, not before not_before) and leases it for 2 minutes, incrementing attempts. Every call records HA's last-poll time.

Acceptance criteria

  • FIFO order and the eligibility rules hold
  • A leased Job isn't handed out again until its lease lapses
  • An empty queue returns a clear empty response
  • Last-poll time is recorded
Part of #73 (spec: #72) ## What to build `GET /v1/smart_home/jobs/next` returns the oldest eligible Job (FIFO by `not_before` or creation; not leased, not expired, not before `not_before`) and leases it for 2 minutes, incrementing attempts. Every call records HA's last-poll time. ## Acceptance criteria - [ ] FIFO order and the eligibility rules hold - [ ] A leased Job isn't handed out again until its lease lapses - [ ] An empty queue returns a clear empty response - [ ] Last-poll time is recorded
bobby added the ready-for-agent label 2026-11-27 16:44:00 -05:00
bobby added a new dependency 2026-11-27 16:44:00 -05:00
bobby added a new dependency 2026-11-27 16:44:01 -05:00
bobby added a new dependency 2026-11-27 16:44:03 -05:00
bobby added a new dependency 2026-11-27 16:44:06 -05:00
bobby added a new dependency 2026-11-27 16:44:09 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: bobby/hapi#144