Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Celery commom config #44

Merged
merged 2 commits into from
Nov 18, 2015
Merged

Celery commom config #44

merged 2 commits into from
Nov 18, 2015

Conversation

mkiwala
Copy link
Contributor

@mkiwala mkiwala commented Nov 18, 2015

Closes genome/ptero-workflow#212

I tested this PR locally against the ptero-petri repo. I checked that configuration is being set correctly by adding a debug print to the petri celery_app.py which prints the results of app.conf.humanize(with_defaults=True, censored=False). Here is an abridged version of that debug print showing the configuration variables that we're setting from ptero-common now, and the new broker heartbeat configuration:

11:10:28 http_worker.1       | CELERY_TASK_SERIALIZER: 'json'
11:10:28 http_worker.1       | CELERY_RESULT_SERIALIZER: 'json'
11:10:28 http_worker.1       | BROKER_TRANSPORT_OPTIONS: {
11:10:28 http_worker.1       |     'confirm_publish': True}
11:10:28 http_worker.1       | BROKER_HEARTBEAT: 300.0
11:10:28 http_worker.1       | CELERY_EVENT_SERIALIZER: 'json'
11:10:28 http_worker.1       | CELERY_ACCEPT_CONTENT: ['json']
11:10:28 http_worker.1       | CELERY_ACKS_LATE: True
11:10:28 http_worker.1       | BROKER_HEARTBEAT_CHECKRATE: 5.0

This commit makes get_config_from_env() a private function.  Services
using ptero_common.celery.utils will need to be updated to import and
use the new get_celery_config() function before upgrading to this
version of ptero-common.
mkiwala added a commit that referenced this pull request Nov 18, 2015
@mkiwala mkiwala merged commit d692d45 into genome:master Nov 18, 2015
@mkiwala mkiwala removed the in review label Nov 18, 2015
@mkiwala
Copy link
Contributor Author

mkiwala commented Nov 18, 2015

Merging immediately so that I can push out changes for ptero-lsf today.

@mkiwala mkiwala deleted the celery-commom-config branch November 18, 2015 17:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant