Skip to content

Commit

Permalink
fix celery start up
Browse files Browse the repository at this point in the history
jefer94 committed Jan 25, 2025
1 parent dddeb9c commit c414272
Showing 6 changed files with 13 additions and 14 deletions.
3 changes: 1 addition & 2 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -30,12 +30,11 @@ tasks:
poetry run python manage.py loaddata breathecode/*/fixtures/dev_*.json &&
poetry run python manage.py create_academy_roles &&
export CACHE=1 &&
poetry run start;
poetry run dev;
- init: gp sync-await deps
command: >
python_version=$(cat .python-version) &&
pyenv global $python_version
- init: gp sync-await deps
vscode:
extensions:
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -15,14 +15,14 @@ new-relic:
release:
@export CORALOGIX_SUBSYSTEM=web; \
export NEW_RELIC_METADATA_COMMIT=${HEROKU_SLUG_COMMIT}; \
# newrelic-admin run-program bin/start-pgbouncer-stunnel \
# newrelic-admin run-program bin/start-pgbouncer \
gunicorn breathecode.wsgi --timeout 29 --workers ${WEB_WORKERS} \
--worker-connections ${WEB_WORKER_CONNECTION} --worker-class ${WEB_WORKER_CLASS}

web:
@export CORALOGIX_SUBSYSTEM=web; \
export NEW_RELIC_METADATA_COMMIT=${HEROKU_SLUG_COMMIT}; \
# newrelic-admin run-program bin/start-pgbouncer-stunnel \
# newrelic-admin run-program bin/start-pgbouncer \
gunicorn breathecode.wsgi --timeout 29 --workers ${WEB_WORKERS} \
--worker-connections ${WEB_WORKER_CONNECTION} --worker-class ${WEB_WORKER_CLASS}

14 changes: 7 additions & 7 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion scripts/cmd.py
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ def install_precommit():


def celery():
os.system(f"celery -A works.celery worker --loglevel=INFO {get_arguments()}")
os.system(f"python -m celery -A breathecode.celery worker --loglevel=INFO {get_arguments()}")


def docs_serve():
2 changes: 1 addition & 1 deletion scripts/dyno/celeryworker.sh
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ done

wait

newrelic-admin run-program bin/start-pgbouncer-stunnel \
newrelic-admin run-program bin/start-pgbouncer \
celery -A breathecode.celery worker --loglevel=$LOG_LEVEL \
--prefetch-multiplier=$CELERY_PREFETCH_MULTIPLIER --pool=$CELERY_POOL \
$SCALING
2 changes: 1 addition & 1 deletion scripts/dyno/web.sh
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ else
export SERVER_TYPE=wsgi;
fi

newrelic-admin run-program bin/start-pgbouncer-stunnel \
newrelic-admin run-program bin/start-pgbouncer \
gunicorn breathecode.$SERVER_TYPE --timeout $WEB_TIMEOUT --workers $WEB_WORKERS \
--worker-connections $WEB_WORKER_CONNECTION --worker-class $WEB_WORKER_CLASS \
--max-requests $WEB_MAX_REQUESTS --max-requests-jitter $WEB_MAX_REQUESTS_JITTER \

0 comments on commit c414272

Please sign in to comment.