Skip to content

Commit

Permalink
chore: trigger commit
Browse files Browse the repository at this point in the history
  • Loading branch information
suejung-sentry committed Jan 3, 2025
1 parent d501c77 commit b07a010
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
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

0 comments on commit b07a010

Please sign in to comment.