Skip to content

Commit

Permalink
Add default celery configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
moisses89 committed Jul 27, 2023
1 parent dd8eea6 commit 1e5f5c2
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,21 @@
# https://docs.celeryproject.org/en/stable/userguide/optimizing.html#broker-connection-pools
# https://docs.celeryq.dev/en/latest/userguide/optimizing.html#broker-connection-pools
CELERY_BROKER_POOL_LIMIT = env(
"CELERY_BROKER_POOL_LIMIT", default=env("CELERYD_CONCURRENCY", default=1000)
"CELERY_BROKER_POOL_LIMIT", default=env("CELERYD_CONCURRENCY", default=0)
)
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#broker-heartbeat
CELERY_BROKER_HEARTBEAT = env.int(
"CELERY_BROKER_HEARTBEAT", default=env("CELERY_BROKER_HEARTBEAT", default=0)
)
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#std-setting-broker_connection_max_retries
CELERY_BROKER_CONNECTION_MAX_RETRIES = env.int(
"CELERY_BROKER_CONNECTION_MAX_RETRIES",
default=env("CELERY_BROKER_CONNECTION_MAX_RETRIES", default=0),
)
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#broker-channel-error-retry
CELERY_BROKER_CHANNEL_ERROR_RETRY = env.int(
"CELERY_BROKER_CHANNEL_ERROR_RETRY",
default=env("CELERY_BROKER_CHANNEL_ERROR_RETRY", default=True),
)
# http://docs.celeryproject.org/en/latest/userguide/configuration.html#std:setting-result_backend
CELERY_RESULT_BACKEND = env("CELERY_RESULT_BACKEND", default="redis://")
Expand All @@ -234,6 +248,7 @@
CELERY_TASK_QUEUE_MAX_PRIORITY = 10
# https://docs.celeryproject.org/en/latest/userguide/configuration.html#broker-transport-options
CELERY_BROKER_TRANSPORT_OPTIONS = {}

# https://docs.celeryq.dev/en/stable/userguide/configuration.html#std-setting-task_routes
CELERY_ROUTES = (
[
Expand Down

0 comments on commit 1e5f5c2

Please sign in to comment.