Skip to content

Commit

Permalink
BC-269 Configure celery pool type and concurrency number.
Browse files Browse the repository at this point in the history
  • Loading branch information
olegtropinin committed Mar 21, 2022
1 parent 2528923 commit dbb6bb7
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ run-server:

.PHONY: run-celery
run-celery:
poetry run celery -A node.config.celery worker --loglevel=INFO
poetry run celery -A node.config.celery worker --loglevel=INFO --pool=eventlet --concurrency=30

.PHONY: shell
shell:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ services:
TNB_DATABASES: '{"default":{"CLIENT":{"host":"node-mongo","password":"${MONGO_INITDB_ROOT_PASSWORD}"}}}'
TNB_CELERY_BROKER_URL: 'amqp://guest:guest@celery-broker:5672//'
env_file: .env
command: poetry run celery -A node.config.celery worker --loglevel=INFO
command: poetry run celery -A node.config.celery worker --loglevel=INFO --pool=eventlet --concurrency=30
depends_on:
- node-mongo
- celery-broker
Expand Down
107 changes: 106 additions & 1 deletion poetry.lock

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

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ celery = "^5.2.3"
sentry-sdk = "^1.5.6"
drf-spectacular = "^0.21.2"
model-bakery = "^1.4.0"
eventlet = "^0.33.0"

[tool.poetry.dev-dependencies]
pre-commit = "^2.15.0"
Expand Down

0 comments on commit dbb6bb7

Please sign in to comment.