Skip to content

Releases: TkTech/chancy

v0.25.1

29 Oct 00:32
b0e3e94

Choose a tag to compare

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_ex always 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() and Chancy.retry_jobs() to bulk purge or
    retry specific jobs by reference.
  • Added _ex versions of purge_jobs, retry_jobs, pause_queue,
    resume_queue, delete_queue, and cancel_job to 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

03 Sep 03:20
e7d4850

Choose a tag to compare

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_polling option to Queue to 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
    the worker.started event anyway (#47) by @PaulM5406.

v0.24.3

21 Jul 08:53

Choose a tag to compare

0.24.3

🐛 Fixes

  • Purely a patch version number bump, as the previous release was not
    properly tagged.

v0.24.2

20 Jul 09:09
d4cb74d

Choose a tag to compare

0.24.2

🐛 Fixes

  • Temporarily remove the ABC base class from Migration to fix a
    bug with DataDog monkey patching. (#44)

v0.24.1

02 Jun 07:49
e4d80ea

Choose a tag to compare

0.24.1

🐛 Fixes

  • Fix the API plugin being imported by the CLI when the API plugin is not
    installed (#42)

v0.24.0

18 May 14:03
dfbba16

Choose a tag to compare

📝 Documentation

  • Correction to the cron plugin example (Thanks @PaulM5406)

🐛 Fixes

  • Fix for sync_push_many_ex using index access for columns instead of key
    by @nico-deforge.
  • Fixed a deprecated usage of ConnectionPool() with an implicit open=True.
  • Fixed the queue.pushed event not waking up a worker waiting for jobs.

✨ Improvements

  • Exposed the created_at field 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.full event 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

27 Mar 04:41

Choose a tag to compare

  • DjangoAuthBackend bugfixes.
  • Login form UX improvements.

v0.23.1

27 Mar 03:18

Choose a tag to compare

  • Patch to fix a minor issue with the DjangoAuthBackend.

v0.23.0

27 Mar 02:27

Choose a tag to compare

  • Support for django-style database settings as the first argument to the
    Chancy constructor 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

23 Mar 23:08
3e4bc66

Choose a tag to compare

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 the Metrics, Leadership, Pruner,
    Recovery and WorkflowPlugin.
  • Queue's now support a resume_at option, 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 emit queue.paused and
    queue.resumed events.
  • 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, add chancy.contrib.django to your
    INSTALLED_APPS.
  • The ProcessExecutor now has a django shim by default, simplifying setup.