Skip to main content
Polling a queued platform job for its result.

PollingSchedule Objects

How often a job is read while it is pending. The wait doubles from initial_seconds up to max_seconds. Each job kind sets its own: a job that finishes in seconds polls more often than one that runs for minutes.

poll_job

Poll the job until it is no longer pending, or the deadline passes; None if it is still pending then. The job is checked at least once, even when the deadline has already passed. Arguments:
  • get_job - Reads the job’s current state from the platform.
  • is_pending - Whether a state means the job is still queued or running.
  • deadline - A time.monotonic() value after which polling stops.
  • schedule - The wait between reads.