Releases: TkTech/chancy
Releases · TkTech/chancy
v0.25.1
0.25.1
✨ Improvements
- Added the Trigger plugin, which allows you to start jobs when arbitrary
database events occur, such as inserts, updates, or deletes. - Ensure
fetch_workflows_exalways has guaranteed deterministic ordering of
the returned workflow steps. - Workflow's now validate before pushing, ensuring workflows with circular
dependencies or invalid dependencies cannot be created. - Test against PostgreSQL 18 and Python 3.14.
- The metrics plugin now tracks metrics on its own operations.
- Added
Chancy.purge_jobs()andChancy.retry_jobs()to bulk purge or
retry specific jobs by reference. - Added
_exversions ofpurge_jobs,retry_jobs,pause_queue,
resume_queue,delete_queue, andcancel_jobto allow passing in a
cursor for transactional operations.
🐛 Fixes
- Fix a workflow's on_single_step_completed potentially running after the
worker has lost leadership. Due to the workflow lock, this could not have
resulted in duplicate work
v0.25.0
0.25.0
🚨 This release requires that you run migrations, as it adds a new queue
setting, eager_polling. Call chancy.migrate() or use the CLI:
chancy --app <your app> misc migrate✨ Improvements
Chancy.wait_for_job()now accepts a list of states to wait for, so you can
use it to wait for a job to begin running, retried, etc... instead of just
finished.Reference()objects are now hashable and have equality.Chancy.wait_for_jobs()added to wait for multiple jobs to finish.Chancy.get_jobs()added to fetch multiple jobs by ID in a single query.- Added the
eager_pollingoption toQueueto trigger immediate polling
whenever an executor slot becomes free. This is useful for low-latency
processing of jobs with low concurrency, but may increase database load (#48)
🐛 Fixes
- Fixed a bug where a job with a unique_key could run multiple times if
pushed again after the job had started running (#51), reported by @mrsshr. - Remove an unused plugin hook
on_worker_started, which is available via
theworker.startedevent anyway (#47) by @PaulM5406.
v0.24.3
v0.24.2
v0.24.1
v0.24.0
📝 Documentation
- Correction to the cron plugin example (Thanks @PaulM5406)
🐛 Fixes
- Fix for
sync_push_many_exusing index access for columns instead of key
by @nico-deforge. - Fixed a deprecated usage of
ConnectionPool()with an implicitopen=True. - Fixed the
queue.pushedevent not waking up a worker waiting for jobs.
✨ Improvements
- Exposed the
created_atfield on a QueuedJob record by @PaulM5406. - Erase the cached psycopg pool connection when the context manager is closed
to support multiple connects and disconnects. - Added
Chancy.sync_declare(),Chancy.sync_declare_ex()and
Chancy.sync_get_job. - Jobs are now naturally fetched oldest to newest due to the nature of the
UUID7s that are used for the job IDs. Job features like priority may affect
this ordering. - Added the
worker.queue.fullevent to notify when a queue's polling event
ran, but was unable to start any jobs due to the executor being full. - If a queue pulled its maximum number of jobs, it'll immediately re-poll for
more, as it's unlikely that the queue is now empty.
v0.23.3
v0.23.1
v0.23.0
- Support for django-style database settings as the first argument to the
Chancyconstructor to ease integration with Django projects. - Chancy's dashboard and API now require a login by default. If the CLI is
used to start the dashboard without an API configured, a random temporary
password will be generated. Authentication backends are pluggable, and Chancy
comes with an optional DjangoAuthBackend. - The dashboard's live event stream is temporarily removed due to Websocket
routes not properly supporting authentication. - Many documentation tweaks
v0.22.0
This release requires that you run migrations, as it converts all JSON columns
to JSONB. Call chancy.migrate() or use the CLI:
chancy --app <your app> misc migrate- Chancy now starts some default plugins with reasonable defaults if they are
not configured. This includes theMetrics,Leadership,Pruner,
RecoveryandWorkflowPlugin. - Queue's now support a
resume_atoption, which allows them to automatically
go active after the specified time. This can be used to implement circuit
breakers. - Added the convenience functions
Chancy.pause_queue()and
Chancy.resume_queue(). Calling this functions will emitqueue.pausedand
queue.resumedevents. - Plugins must now provide a
get_identifier()method, which should return a
unique identifier for the plugin. - Plugins may now implement
get_depdenencies()to return a list of other
plugins that they depend on. - The default queue polling interval for new queues has been increased from
1 to 5 seconds. - All JSON columns have been converted to JSONB, which is more efficient and
allows for indexing, and is supported by Django's JSONField type.
Metrics Plugin
- Internal implementation of the Metrics plugin has been significantly
simplified. - Metrics plugin now tracks job completion status on a per-queue basis as well
as globally, which allows for the implementation of global, per-queue circuit
breaker logic.
Django
- Chancy now comes with a Django app that gives you ORM and Admin access to
Chancy's data. To install it, addchancy.contrib.djangoto your
INSTALLED_APPS. - The ProcessExecutor now has a django shim by default, simplifying setup.