Skip to content

sergsoares/chancy-task-queue-example

Repository files navigation

Project example using Chancy (postgre queue) for python

Application using Chancy that is a Task queue in Python that support Schedule tasks for future, recurrency tasks and even workflow with dependency using postgres as a storage.

This repo contains a simple example structure with Chancy for demonstrate usage coming configured with the dashboard, for this project we will use uv package manager to install the dependencies and DBngin to create a postgresql.

Configure the postgres URI for your application

export CHANCY_DB_URL="postgresql://postgres:postgres@localhost:5430/postgres"

Then you can initialize the database with the migrations and create the queues:

uv run 00-init.py

For the migrations that are the tables that will be created.

alt text

Then we can initialize our first jobs.

uv run 01-create-jobs.py

And now we can initialize our worker to process the jobs and view our dashboard.

uv run 02-worker.py

We can see the logs of our jobs and access the Chancy dashboard with the credentials (admin/admin).

alt text

And we can look into details for each job.

alt text

Or into details for specific queues about the number of jobs already processed.

alt text

About

Example using chancy task queue

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages