From 6ba0d3c8b3df2638fc2cfb1fe4cb8c45224e6f7b Mon Sep 17 00:00:00 2001 From: tresbailey Date: Tue, 6 Aug 2013 23:15:32 -0400 Subject: [PATCH] Added celeryconfig template config --- conf.d/celeryconfig.py.erb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 conf.d/celeryconfig.py.erb diff --git a/conf.d/celeryconfig.py.erb b/conf.d/celeryconfig.py.erb new file mode 100644 index 0000000..da8cc19 --- /dev/null +++ b/conf.d/celeryconfig.py.erb @@ -0,0 +1,11 @@ +## Broker settings. +BROKER_URL = 'mongodb://%s:%d/celery_tasks' % (<%= ENV['OPENSHIFT_MONGODB_DB_HOST'] %>, <%= ENV['OPENSHIFT_MONGODB_DB_PORT'] %>) + +# List of modules to import when celery starts. +CELERY_IMPORTS = ("<%= ENV['OPENSHIFT_CELERY_IMPORTS %>", ) + +## Using the database to store task state and results. +CELERY_RESULT_BACKEND = "mongodb" +CELERY_RESULT_DBURI = 'mongodb://%s:%d/celery_tasks' % (<%= ENV['OPENSHIFT_MONGODB_DB_HOST'] %>, <%= ENV['OPENSHIFT_MONGODB_DB_PORT'] %>) + +CELERY_ANNOTATIONS = {"tasks.add": {"rate_limit": "10/s"}}