You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* add agent source tracking to user-agent header ([#508](https://github.com/runpod/runpod-python/issues/508)) ([92239c8](https://github.com/runpod/runpod-python/commit/92239c817a64dada82b578e3447c1b4015afef9a))
9
+
* add per-job stop capability to serverless worker ([#510](https://github.com/runpod/runpod-python/issues/510)) ([21c4786](https://github.com/runpod/runpod-python/commit/21c4786847bd2e5fd2ca6d15f85737203a3044a1))
10
+
* detect all coding agents in user-agent, not just Claude Code ([#519](https://github.com/runpod/runpod-python/issues/519)) ([d14c67c](https://github.com/runpod/runpod-python/commit/d14c67c4e82963e61396b58a11dfd7046abbdde0))
11
+
* support Python 3.10-3.14, drop EOL 3.8/3.9 ([#512](https://github.com/runpod/runpod-python/issues/512)) ([8e9d94e](https://github.com/runpod/runpod-python/commit/8e9d94e69105859c159e70fa9ae6bbf094297a2e))
12
+
13
+
14
+
### Bug Fixes
15
+
16
+
***deps:** bump cryptography floor to >=48.0.1 for OpenSSL fix ([#516](https://github.com/runpod/runpod-python/issues/516)) ([18c6841](https://github.com/runpod/runpod-python/commit/18c6841f77388e9f48f0b82d14e32bc6a0e26f7c)), closes [#511](https://github.com/runpod/runpod-python/issues/511)
Copy file name to clipboardExpand all lines: docs/serverless/worker.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,12 @@ For more complex operations where you are downloading files or making changes to
58
58
return {"output": "Job completed successfully"}
59
59
```
60
60
61
+
## Stopping Individual Jobs
62
+
63
+
A worker can process more than one job concurrently. When a single request is cancelled, expires, or times out, the Runpod server signals the worker to stop just that request without affecting the worker's other in-progress jobs. The worker continuously polls a dedicated stop channel; the server is expected to hold each request open (long-poll) until a stop signal is available or the poll times out. When a signal arrives, the worker cancels the task running the matching job, so a stopped job no longer consumes worker time.
64
+
65
+
No handler changes are required to support this. Async handlers that hold resources can perform cleanup by catching `asyncio.CancelledError`, but they **must re-raise** it after cleaning up. Swallowing the cancellation makes the worker report the job as completed instead of stopped.
66
+
61
67
## See Also
62
68
63
69
- [Worker Fitness Checks](./worker_fitness_checks.md) - Validate your worker environment at startup
0 commit comments