-
Notifications
You must be signed in to change notification settings - Fork 300
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update dependencies with security fixes (#2596)
Update dependencies with security fixes (#2596)
- Loading branch information
Showing
18 changed files
with
715 additions
and
798 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,3 @@ | ||
#!/bin/bash | ||
printf "celery-beat" > /tmp/container-role | ||
|
||
if [ -z "${DATABASE_URL}" ]; then | ||
export DATABASE_URL="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}" | ||
fi | ||
|
||
postgres_ready() { | ||
python << END | ||
import sys | ||
import psycopg | ||
try: | ||
psycopg.connect(conninfo="${DATABASE_URL}") | ||
except psycopg.OperationalError as e: | ||
print(e) | ||
sys.exit(-1) | ||
sys.exit(0) | ||
END | ||
} | ||
|
||
until postgres_ready; do | ||
>&2 echo 'Waiting for PostgreSQL to become available...' | ||
sleep 1 | ||
done | ||
>&2 echo 'PostgreSQL is available' | ||
|
||
python manage.py migrate --noinput | ||
python manage.py compilemessages | ||
python manage.py load_redis_index | ||
python manage.py load_event_types | ||
|
||
touch /tmp/healthy | ||
|
||
celery --app=config.celery_app beat --loglevel=info | ||
echo "This script is deprecated. Use celery_beat.sh instead." | ||
exec "$(dirname "$0")/celery_beat.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,21 @@ | ||
#!/bin/bash | ||
printf "celery-beat" > /tmp/container-role | ||
|
||
if [ -z "${DATABASE_URL}" ]; then | ||
export DATABASE_URL="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}" | ||
fi | ||
|
||
postgres_ready() { | ||
python << END | ||
import sys | ||
import psycopg | ||
set -euo pipefail | ||
|
||
try: | ||
psycopg.connect(conninfo="${DATABASE_URL}") | ||
except psycopg.OperationalError as e: | ||
print(e) | ||
sys.exit(-1) | ||
sys.exit(0) | ||
END | ||
} | ||
|
||
until postgres_ready; do | ||
>&2 echo 'Waiting for PostgreSQL to become available...' | ||
sleep 1 | ||
done | ||
>&2 echo 'PostgreSQL is available' | ||
./wait_for_db.sh | ||
./wait_for_redis.sh | ||
|
||
python manage.py migrate --noinput | ||
python manage.py compilemessages | ||
python manage.py compilemessages -v 0 | ||
python manage.py load_redis_index | ||
python manage.py load_event_types | ||
|
||
touch /tmp/healthy | ||
|
||
export NEW_RELIC_CONFIG_FILE=/etc/newrelic.ini | ||
newrelic-admin run-program celery --app=config.celery_app beat --loglevel=info | ||
if [[ -f "$NEW_RELIC_CONFIG_FILE" ]]; then | ||
newrelic-admin run-program celery --app=config.celery_app beat --loglevel=info | ||
else | ||
celery --app=config.celery_app beat --loglevel=info | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,3 @@ | ||
#!/bin/bash | ||
printf "celery-worker" > /tmp/container-role | ||
|
||
if [ -z "${DATABASE_URL}" ]; then | ||
export DATABASE_URL="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}" | ||
fi | ||
|
||
python manage.py collectstatic --noinput | ||
python manage.py compilemessages | ||
celery --app=config.celery_app worker --max-tasks-per-child=6 --loglevel=info | ||
echo "This script is deprecated. Use celery_worker.sh instead." | ||
exec "$(dirname "$0")/celery_worker.sh" |
Oops, something went wrong.