Permalink
Browse files

Replace -c2 in Procfile.heroku with env variable

Replace -c2 in Procfile.heroku with
-c${REDASH_HEROKU_CELERY_WORKER_COUNT:-2}. This reads from the
environment variable REDASH_HEROKU_CELERY_WORKER_COUNT and
uses the value of that if set, otherwise defaults to 2.
Add REDASH_HEROKU_CELERY_WORKER_COUNT to the settings page.
  • Loading branch information...
1 parent 7445972 commit 7d10edd32ce5144286bf8c864260f05637589654 @adamlwgriffiths adamlwgriffiths committed Jul 5, 2016
Showing with 2 additions and 1 deletion.
  1. +1 −1 Procfile.heroku
  2. +1 −0 docs/settings.rst
View
@@ -1,2 +1,2 @@
web: ./manage.py runserver -d -r -p $PORT --host 0.0.0.0
-worker: celery worker --app=redash.worker -c2 --beat -Q queries,celery,scheduled_queries
+worker: celery worker --app=redash.worker -c${REDASH_HEROKU_CELERY_WORKER_COUNT:-2} --beat -Q queries,celery,scheduled_queries
View
@@ -14,6 +14,7 @@ The follow is a list of settings and what they control:
- **REDASH_DATABASE_URL**: *default "postgresql://postgres"*
- **REDASH_CELERY_BROKER**: *default REDIS_URL*
- **REDASH_CELERY_BACKEND**: *default CELERY_BROKER*
+- **REDASH_HEROKU_CELERY_WORKER_COUNT**: *default 2*
- **REDASH_QUERY_RESULTS_CLEANUP_ENABLED**: *default "true"*
- **REDASH_QUERY_RESULTS_CLEANUP_COUNT**: *default "100"*
- **REDASH_QUERY_RESULTS_CLEANUP_MAX_AGE**: *default "7"*

0 comments on commit 7d10edd

Please sign in to comment.