- Python version 3.8+ click here
- Pip version 20.0+ click here
- Redis-Server version 5.0.7+ click here
api/
: API Rootapi/task
: To view, create, update, modify, delete tasksapi/tasktracker
: To view, create, update, modify, delete task trackers
- Make a new virtual environment
python3 -m venv <name>
- Start the virtual environment
source <name>/bin/activate
- Install the requirements
pip3 install -r requirements.txt
- Make migrations of the models of the app
python3 manage.py migrate
- Start the app
python3 manage.py runserver 8080
- Check if redis-server is working
redis-server && redis-cli ping
- Start the celery worker
celery -A tracker_project worker -l info
(seperate terminal with same virtual environment) - Start the celery beat
celery -A tracker_project beat -l info
(seperate terminal with same virtual environment) - Crontab tasks are defined in
tracker_api/tasks.py
Note : Pypi project django-celery required a celery version < 4.0, but I have used celery version 4.3, therefore I used celery directly through celery.py
in tracker_project