> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encord.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Common.polling

Polling a queued platform job for its result.

## PollingSchedule Objects

```python theme={"dark"}
@dataclass(frozen=True)
class PollingSchedule()
```

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

```python theme={"dark"}
def poll_job(
    get_job: Callable[[], JobT],
    is_pending: Callable[[JobT], bool],
    deadline: float,
    schedule: PollingSchedule = PollingSchedule()
) -> Optional[JobT]
```

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.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.