This repository was archived by the owner on Jun 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # starts the development server using gunicorn
4+ # NEVER run production with the --reload option command
5+ echo " Starting gunicorn in dev mode"
6+
7+ _start_gunicorn () {
8+ if [ -n " $PROMETHEUS_MULTIPROC_DIR " ]; then
9+ rm -r ${PROMETHEUS_MULTIPROC_DIR?} /* 2> /dev/null
10+ mkdir -p " $PROMETHEUS_MULTIPROC_DIR "
11+ fi
12+
13+ export PYTHONWARNINGS=always
14+ suffix=" "
15+ if [[ " $STATSD_HOST " ]]; then
16+ suffix=" --statsd-host ${STATSD_HOST} :${STATSD_PORT} "
17+ fi
18+ if [ " $RUN_ENV " == " ENTERPRISE" ] || [ " $RUN_ENV " == " DEV" ]; then
19+ python manage.py migrate
20+ python manage.py migrate --database " timeseries" timeseries
21+ python manage.py pgpartition --yes --skip-delete
22+ fi
23+ if [[ " $DEBUGPY " ]]; then
24+ pip install debugpy
25+ python -m debugpy --listen 0.0.0.0:12345 -m gunicorn codecov.wsgi:application --reload --bind 0.0.0.0:8000 --access-logfile ' -' --timeout " ${GUNICORN_TIMEOUT:- 600} " $suffix
26+ fi
27+ gunicorn codecov.wsgi:application --reload --bind 0.0.0.0:8000 --access-logfile ' -' --timeout " ${GUNICORN_TIMEOUT:- 600} " $suffix
28+ }
29+
30+ if [ -z " $1 " ];
31+ then
32+ _start_gunicorn
33+ else
34+ exec " $@ "
35+ fi
Original file line number Diff line number Diff line change @@ -191,3 +191,5 @@ class Meta:
191191 "completed_at" ,
192192 )
193193 fields = read_only_fields
194+
195+ # some random comment
You can’t perform that action at this time.
0 commit comments