Commit 38ae08ff by Jim Abramson

Merge pull request #28 from edx/jsa/config-task-rate-limit

make task rate configurable from env
parents ba5b8a4c abfb9dcc
...@@ -86,8 +86,8 @@ import djcelery ...@@ -86,8 +86,8 @@ import djcelery
djcelery.setup_loader() djcelery.setup_loader()
BROKER_URL = os.getenv('BROKER_URL', 'django://') BROKER_URL = os.getenv('BROKER_URL', 'django://')
# limit the frequency with which the forum digest task may run. # limit the frequency at which the forum digest celery task may be run.
FORUM_DIGEST_TASK_RATE_LIMIT = "6/m" # no more than every 10 seconds FORUM_DIGEST_TASK_RATE_LIMIT = os.getenv('FORUM_DIGEST_TASK_RATE_LIMIT', '6/m')
# limit the size of user batches (cs service pulls / emails sent) per-task # limit the size of user batches (cs service pulls / emails sent) per-task
FORUM_DIGEST_TASK_BATCH_SIZE = int(os.getenv('FORUM_DIGEST_TASK_BATCH_SIZE', 5)) FORUM_DIGEST_TASK_BATCH_SIZE = int(os.getenv('FORUM_DIGEST_TASK_BATCH_SIZE', 5))
# limit the number of times an individual task will be retried # limit the number of times an individual task will be retried
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment