Skip to content

Python Task Scheduling Using Celery, Django, Flower

Notifications You must be signed in to change notification settings

udaynbausj/task-scheduler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Task-Scheduler
Tasks which are cpu intensive and doesn't need an immediate response can be processed in background. For example, generating Pdf files. User might not expect the Pdf generation in real-time. So, we can leverage the performance of task-queues for such scenarios.

Queues have other advantages like persistence, reliability, decoupling.

This repo is one such example which fakes cpu intensive tasks and sends the task to queue. Here we use RabbitMq as broker. Celery is being used in this repo. Celery provides apis for task-queues and supports distributed environment.Used Django as framework.

##Dependencies
Python - 3.9
Django - 3.1
Celery - 5.0
RabbitMq - 3.8.9

##Commands
$ celery -A task_scheduler worker -Q {queue_name}
$ celery -A task_scheduler beat
$ python manage.py runserver

###Note
We need to run Django Server as well as celery worker.

About

Python Task Scheduling Using Celery, Django, Flower

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages