Adds django celery beat

This commit is contained in:
Mouse Reeve 2022-02-26 08:44:19 -08:00
parent ab1c7c6d0a
commit 95e9119817
4 changed files with 16 additions and 0 deletions

View file

@ -90,6 +90,7 @@ INSTALLED_APPS = [
"sass_processor",
"bookwyrm",
"celery",
'django_celery_beat',
"imagekit",
"storages",
]

1
bw-dev
View file

@ -215,6 +215,7 @@ case "$CMD" in
;;
setup)
migrate
migrate django_celery_beat
initdb
runweb python manage.py collectstatic --no-input
admin_code

View file

@ -70,6 +70,19 @@ services:
- db
- redis_broker
restart: on-failure
celery_beat:
env_file: .env
build: .
networks:
- main
command: celery -A celerywyrm beat -l INFO --scheduler django_celery_beat.schedulers:DatabaseScheduler
volumes:
- .:/app
- static_volume:/app/static
- media_volume:/app/images
depends_on:
- celery_worker
restart: on-failure
flower:
build: .
command: celery -A celerywyrm flower --basic_auth=${FLOWER_USER}:${FLOWER_PASSWORD}

View file

@ -1,6 +1,7 @@
celery==5.2.2
colorthief==0.2.1
Django==3.2.12
django-celery-beat==2.2.1
django-compressor==2.4.1
django-imagekit==4.1.0
django-model-utils==4.0.0