Skip to content

Commit

Permalink
Worker: fixing worker basic imports
Browse files Browse the repository at this point in the history
  • Loading branch information
jaesivsm committed May 4, 2020
1 parent bebe630 commit c22ab15
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ep_celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from celery import Celery, signals
from jarr.bootstrap import conf, commit_pending_sql, rollback_pending_sql

celery_app = Celery(broker=conf.celery.BROKER_URL, config_source=conf.celery)
celery_app = Celery(broker=conf.celery.BROKER_URL,
config_source=conf.celery)
signals.task_success.connect(commit_pending_sql)
signals.task_failure.connect(rollback_pending_sql)
4 changes: 4 additions & 0 deletions jarr/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
{'CELERY_TIMEZONE': {'default': 'Europe/Paris'}},
{'CELERY_ENABLE_UTC': {'default': True, 'type': bool}},
{'CELERY_IMPORTS': {'default': 'ep_celery'}},
{'CELERY_IMPORTS': {
'default': ('ep_celery', 'jarr.crawler.main'),
'type': tuple},
},
{'CELERY_DEFAULT_QUEUE': {'default': 'jarr'}},
{'CELERY_DEFAULT_EXCHANGE': {'default': 'jarr'}}]},
{'log': [{'level': {'default': logging.WARNING, 'type': int}},
Expand Down

0 comments on commit c22ab15

Please sign in to comment.