sidejob 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sidejob-0.1.0/.gitignore +9 -0
- sidejob-0.1.0/CHANGELOG.md +34 -0
- sidejob-0.1.0/LICENSE +21 -0
- sidejob-0.1.0/PKG-INFO +749 -0
- sidejob-0.1.0/README.md +716 -0
- sidejob-0.1.0/examples/analytics_examples.py +127 -0
- sidejob-0.1.0/examples/demo.py +136 -0
- sidejob-0.1.0/pyproject.toml +75 -0
- sidejob-0.1.0/src/sidejob/__init__.py +71 -0
- sidejob-0.1.0/src/sidejob/_status.py +37 -0
- sidejob-0.1.0/src/sidejob/context.py +177 -0
- sidejob-0.1.0/src/sidejob/errors.py +114 -0
- sidejob-0.1.0/src/sidejob/manager.py +1527 -0
- sidejob-0.1.0/src/sidejob/py.typed +0 -0
- sidejob-0.1.0/src/sidejob/records.py +170 -0
- sidejob-0.1.0/src/sidejob/retry.py +135 -0
- sidejob-0.1.0/src/sidejob/workflow.py +293 -0
- sidejob-0.1.0/tests/conftest.py +82 -0
- sidejob-0.1.0/tests/test_basic.py +347 -0
- sidejob-0.1.0/tests/test_cooperative.py +395 -0
- sidejob-0.1.0/tests/test_lifecycle.py +211 -0
- sidejob-0.1.0/tests/test_retry.py +216 -0
- sidejob-0.1.0/tests/test_wait_all.py +238 -0
- sidejob-0.1.0/tests/test_workflow.py +237 -0
sidejob-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project
|
|
5
|
+
uses [Semantic Versioning](https://semver.org/).
|
|
6
|
+
|
|
7
|
+
## [0.1.0] - 2026-10-16
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- `sidejob.initialize()` returning a `JobManager` with one bounded thread pool,
|
|
12
|
+
a thread-safe job registry, retry defaults and a logger.
|
|
13
|
+
- `parallel_job()`, `get_run()`, `get_status()`, `get_result()`,
|
|
14
|
+
`get_all_runs()`, `get_failed_runs()`, `get_summary()`, `wait()`,
|
|
15
|
+
`wait_all()`, `cancel()` and `shutdown()`.
|
|
16
|
+
- Managed workflows (`manager.workflow()`) with a mandatory `wait_all()`
|
|
17
|
+
barrier that checks only the workflow's own jobs.
|
|
18
|
+
- `RetryPolicy`: bounded retries with exponential backoff, jitter and
|
|
19
|
+
configurable retryable / never-retry exception types.
|
|
20
|
+
- Structured per-job attempt and event history, independent of log levels.
|
|
21
|
+
- Job deadlines, detected by a scheduler as soon as they pass, with optional
|
|
22
|
+
`cancel_on_deadline`.
|
|
23
|
+
- Cooperative cancellation for running jobs: `sidejob.check_cancelled()`,
|
|
24
|
+
`sidejob.sleep()`, `sidejob.cancel_requested()` and `sidejob.on_cancel()`
|
|
25
|
+
hooks (for example `conn.cancel` or Spark `cancelJobGroup`).
|
|
26
|
+
- `sidejob.current_job()` returning a `JobContext` with `attempt`, `is_retry`
|
|
27
|
+
and a stable `idempotency_key`, so retries can avoid repeating side effects.
|
|
28
|
+
- Retries wait on a scheduler thread instead of holding a worker during the
|
|
29
|
+
backoff.
|
|
30
|
+
- Memory retention controls: job inputs are released on completion, retried
|
|
31
|
+
attempt tracebacks release their frames, `history_limit=` evicts old
|
|
32
|
+
COMPLETED jobs, and `clear_history()` frees memory on demand.
|
|
33
|
+
|
|
34
|
+
[0.1.0]: https://github.com/Yashjindal11/sidejob/releases/tag/v0.1.0
|
sidejob-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Sidejob contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|