Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: trigger commit #1082

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

# starts the development server using gunicorn
# NEVER run production with the --reload option command
echo "Starting gunicorn in dev mode"

_start_gunicorn() {
if [ -n "$PROMETHEUS_MULTIPROC_DIR" ]; then
rm -r ${PROMETHEUS_MULTIPROC_DIR?}/* 2> /dev/null
mkdir -p "$PROMETHEUS_MULTIPROC_DIR"
fi

export PYTHONWARNINGS=always
suffix=""
if [[ "$STATSD_HOST" ]]; then
suffix="--statsd-host ${STATSD_HOST}:${STATSD_PORT}"
fi
if [ "$RUN_ENV" == "ENTERPRISE" ] || [ "$RUN_ENV" == "DEV" ]; then
python manage.py migrate
python manage.py migrate --database "timeseries" timeseries
python manage.py pgpartition --yes --skip-delete
fi
if [[ "$DEBUGPY" ]]; then
pip install debugpy
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
fi
gunicorn codecov.wsgi:application --reload --bind 0.0.0.0:8000 --access-logfile '-' --timeout "${GUNICORN_TIMEOUT:-600}" $suffix
}

if [ -z "$1" ];
then
_start_gunicorn
else
exec "$@"
fi
2 changes: 2 additions & 0 deletions upload/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,5 @@ class Meta:
"completed_at",
)
fields = read_only_fields

# some random comment
Loading