# Jobs and polling

URL: https://docs.sigment.ai/guides/jobs-and-polling

How long work runs, how to wait for it, and what never to do.

Discoveries take a few minutes, and analyses several minutes, longer when the scraper is busy. Paid tools return a `job_id` immediately.

```txt
discover_creators(...)        → { job_id: "discovery:…", poll_after_seconds: 30 }
wait_for_job(job_id)          → { status: "running", stage: "scraping" }   # after up to 25 s
wait_for_job(job_id)          → { status: "completed" }
get_discovery(discovery_id)   → results
```

- `wait_for_job` blocks for at most **25 seconds** (larger `timeout_seconds` values are capped). If the job is still running, call it again.
- `stage: "queued"` means the scraper is at capacity. The job **starts by itself**: keep waiting.
- **Never resubmit a running or queued job.** A duplicate is refused with "Already in progress … Poll the existing job instead".
- `failed` jobs are refunded. Read the message before retrying.
- To resume later, `list_discoveries` and `list_analyses` return earlier work.
