File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ umask 0002
3+
4+ id
5+
6+ set -e # needed to handle "exit" correctly
7+
8+ . /secret-file-loader.sh
9+ . /reach_database.sh
10+
11+ wait_for_database_to_be_reachable
12+ echo
13+
14+ if [ " ${DD_CELERY_WORKER_POOL_TYPE} " = " prefork" ]; then
15+ EXTRA_PARAMS=(" --autoscale=${DD_CELERY_WORKER_AUTOSCALE_MAX} ,${DD_CELERY_WORKER_AUTOSCALE_MIN} "
16+ " --prefetch-multiplier=${DD_CELERY_WORKER_PREFETCH_MULTIPLIER} " )
17+ else
18+ EXTRA_PARAMS=()
19+ fi
20+
21+ # do the check with Django stack
22+ python3 manage.py check
23+
24+ # hot reload using watmedo as we don't want to install celery[dev] and have that end up in our production images
25+ watchmedo auto-restart --directory=./ --pattern=" *.py;*.tpl" --recursive -- \
26+ celery --app=dojo worker --loglevel=" ${DD_CELERY_LOG_LEVEL} " --pool=" ${DD_CELERY_WORKER_POOL_TYPE} " --concurrency=" ${DD_CELERY_WORKER_CONCURRENCY:- 1} " " ${EXTRA_PARAMS[@]} "
You can’t perform that action at this time.
0 commit comments