mrcrowley42 / Project5

0 stars 0 forks source link

Project5

Follow SETUP.md instructions before continuing

Once cloned, run python manage.py migrate in the venv (cd into project5_dj first) to create and insert required data into the sqlite3 database.

Run python manage.py runserver to start the WOE app.

Celery and Celery Beat is used to update the database every X mins with new data from the API.
In a separate terminal from the Django server, run celery -A project5_dj worker -B to start the worker and the beat together.
For more output add -l info, or -l debug to the end of the command.

IMPORTANT: For production the celery worker and beat should run separately. This can be done by running celery -A project5_dj worker, and celery -A project5_dj beat in two seperate terminals.

Inside the Django settings file there are the following settings

'DEBUG_LEVEL' Defines the default logging level.
'LOGGING_OUTPUT_PATH' The location to output the log file "example.log"