Skip to content

percipient-ai/django-background-tasks-example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-background-tasks-example

This example shows how to set up and use django-background-tasks.

Usage

Install project dependencies

pip install -r requirements.txt

Prepare database

cd project
python manage.py migrate

Start the server.

python manage.py runserver

Register a task (on separate terminal)

curl -d message=hello http://localhost:8000/api/v1/tasks/

Process tasks

python manage.py process_tasks

The primary downside of using this background tasks with pika is that we need a separate django call to process tasks. I'm not sure how easy this is to do in deployment. Then, we need to curl any listening tasks.

About

An example app using django-backgrond-tasks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%