mirror of
https://github.com/tubearchivist/tubearchivist.git
synced 2024-11-16 16:50:12 +00:00
9366b8eab9
* add django-celery-beat * implement schedule migration * fix version_check migration * remove old schedule init * better schedule migration * fix task_config migration * show task config on settings page * fix notify url builder * refactor celery initiation * fix get task * fix scheduler mig * fix linter * better task_config store on periodic task * save new schedules * fix task_config extraction from custom model * implement auto schedule * implement schedule delete * refactor notifications to ES config storage * downgrade redis * better notification migration to ES * add notification url handling * fix worker start * fix docs spelling * don't resend form data on notification refresh * fix type hints * move TASK_CONFIG to separate module * fix partial task config imports * fix yt_obs typing * delete schedule * remove outdated instructions * create initial schedules * fix reindex days config key * fix doc string * unregister BeatModels
24 lines
528 B
Bash
24 lines
528 B
Bash
#!/bin/bash
|
|
# startup script inside the container for tubearchivist
|
|
|
|
set -e
|
|
|
|
# django setup
|
|
python manage.py migrate
|
|
|
|
if [[ -z "$DJANGO_DEBUG" ]]; then
|
|
python manage.py collectstatic --noinput -c
|
|
fi
|
|
|
|
# ta setup
|
|
python manage.py ta_envcheck
|
|
python manage.py ta_connection
|
|
python manage.py ta_startup
|
|
|
|
# start all tasks
|
|
nginx &
|
|
celery -A home.celery worker --loglevel=INFO --max-tasks-per-child 10 &
|
|
celery -A home beat --loglevel=INFO \
|
|
--scheduler django_celery_beat.schedulers:DatabaseScheduler &
|
|
uwsgi --ini uwsgi.ini
|