Integrated Celery startup / management / config with PillarServer.

This commit is contained in:
2017-06-01 16:15:44 +02:00
parent e7d268bde6
commit 5af54237b9
7 changed files with 41 additions and 29 deletions

View File

@@ -4,12 +4,10 @@ import bson
from pillar import current_app
from .celery_cfg import celery_cfg
log = logging.getLogger(__name__)
@celery_cfg.task(ignore_result=True)
@current_app.celery.task(ignore_result=True)
def push_updated_user_to_algolia(user_id: str):
"""Push an update to the Algolia index when a user item is updated"""