CodeBaobab
Scheduling and state

Drain a document-processing worker pool

Problem

A document pipeline uses separate CPU and GPU worker pools. Operations must remove one pool for maintenance while imports continue. Define the job states and explain how queued and running work move through the system. Walk through a small example with an in-flight job and a queued job.

What you know

  • Jobs declare a capability and tenant. Each tenant gets a fair share within a capability.
  • A running job owns an expiring lease. Its worker can complete after the lease expires.
  • Some jobs produce a customer-visible result. Duplicate results must not be published.

Checking exercise access…