Generic, payload-agnostic, multipod-safe scheduled-jobs core -- cross-pod-locked tick engine, reschedule math, store protocols, and a default kind+payload store
Project description
3tears-scheduled-jobs
A generic, payload-agnostic, multipod-safe scheduled-jobs core. Every agent/skill/webhook/conversation-specific concept is stripped out, leaving only the scheduling machinery.
What it gives you:
scheduled_tick_job(...)-- one cross-pod-locked tick pump. Acquire thenats_distributed_lockat a caller-supplied key; onLockHeldskip silently; onKvErrordegrade open (the per-row optimistic-CAS is the real guard); enumerate due rows; per-row CAS-claim + reschedule; invoke an injected dispatch callback; drift / missed-fire accounting; per-row failure isolation. Takes the store(s), the dispatch callback, and the NATS client as parameters, with no domain knowledge.compute_next_fire_at(...)-- the pure reschedule math for every schedule type (daily_at,every_n_hours,random_within_window,one_shot_at,cron,relative_delay,interval) and both missed-fire policies (coalesce,catch_up). Thecronbranch imports APScheduler lazily, so non-cron consumers pay nothing.ScheduleStore/FireStoreProtocols -- the exact surface the tick engine calls. The engine depends only on these, so a typed consumer collection can implement them.- A default store --
ScheduledJobEntity/JobFireEntity+ collections +scheduled_jobs/job_firestable factories + a v001 migration, keyed on an opaquekind(TEXT) +payload(JSONB). A simple consumer can use it as-is with no table of its own. - Generic config / events / metrics -- a
JobConfigprotocol, the tick / fire / drift event-name constants, and cardinality-bounded Prometheus instruments.
The engine is pure-async, one tick per call with no internal polling.
Drive cadence with whatever scheduler you like (an APScheduler
IntervalTrigger, a while True: await asyncio.sleep(...), and so on). The
engine does not own the scheduler.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file 3tears_scheduled_jobs-0.15.0.tar.gz.
File metadata
- Download URL: 3tears_scheduled_jobs-0.15.0.tar.gz
- Upload date:
- Size: 52.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ff2535e8af35a18cca616a1bb0026c803956357084d1dd1facf5172cdc4db5b
|
|
| MD5 |
e4d94e4a42da565089a6c465c6578346
|
|
| BLAKE2b-256 |
2cb7a9ff46ac30aa0dcc11e7bfe5393db72256cdfbc88ad60dd5135a2ca84115
|
Provenance
The following attestation bundles were made for 3tears_scheduled_jobs-0.15.0.tar.gz:
Publisher:
release.yml on pacepace/3tears
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
3tears_scheduled_jobs-0.15.0.tar.gz -
Subject digest:
6ff2535e8af35a18cca616a1bb0026c803956357084d1dd1facf5172cdc4db5b - Sigstore transparency entry: 2157045710
- Sigstore integration time:
-
Permalink:
pacepace/3tears@6ba17c2c246cc2768e3deaf3d936c9c03d5b2c4f -
Branch / Tag:
refs/tags/v0.15.0 - Owner: https://github.com/pacepace
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6ba17c2c246cc2768e3deaf3d936c9c03d5b2c4f -
Trigger Event:
push
-
Statement type:
File details
Details for the file 3tears_scheduled_jobs-0.15.0-py3-none-any.whl.
File metadata
- Download URL: 3tears_scheduled_jobs-0.15.0-py3-none-any.whl
- Upload date:
- Size: 45.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cb8762e8b039c6f2040b17b1f64fe781c181fcd11084511ff71ab4e11068b49
|
|
| MD5 |
9692b336c9f812e5e1e434eb51e061d4
|
|
| BLAKE2b-256 |
763905c845d1f7b8a05d5854adb7834caff811fee28e11c7f05da7a1dceac7ba
|
Provenance
The following attestation bundles were made for 3tears_scheduled_jobs-0.15.0-py3-none-any.whl:
Publisher:
release.yml on pacepace/3tears
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
3tears_scheduled_jobs-0.15.0-py3-none-any.whl -
Subject digest:
6cb8762e8b039c6f2040b17b1f64fe781c181fcd11084511ff71ab4e11068b49 - Sigstore transparency entry: 2157049741
- Sigstore integration time:
-
Permalink:
pacepace/3tears@6ba17c2c246cc2768e3deaf3d936c9c03d5b2c4f -
Branch / Tag:
refs/tags/v0.15.0 - Owner: https://github.com/pacepace
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6ba17c2c246cc2768e3deaf3d936c9c03d5b2c4f -
Trigger Event:
push
-
Statement type: