change how post_update_tasks fire
This commit is contained in:
parent
7b096d76d0
commit
028a145505
@ -1,6 +1,7 @@
|
||||
from oyster.conf import settings
|
||||
|
||||
CELERY_IMPORTS = ["oyster.tasks"] + list(settings.CELERY_TASK_MODULES)
|
||||
CELERY_IMPORTS = ['oyster.tasks',
|
||||
'oyster.ext.cloudsearch'] + list(settings.CELERY_TASK_MODULES)
|
||||
|
||||
BROKER_TRANSPORT = 'mongodb'
|
||||
BROKER_HOST = settings.MONGO_HOST
|
||||
|
@ -12,7 +12,8 @@ class UpdateTask(Task):
|
||||
def run(self, doc_id):
|
||||
doc = kernel.db.tracked.find_one({'_id': doc_id})
|
||||
kernel.update(doc)
|
||||
for task in doc.get('post_update_tasks', []):
|
||||
for task in kernel.doc_classes[doc['doc_class']].get(
|
||||
'post_update_tasks', []):
|
||||
send_task(task, (doc_id,))
|
||||
kernel.db.status.update({}, {'$inc': {'update_queue': -1}})
|
||||
# don't sit on a connection
|
||||
|
Loading…
Reference in New Issue
Block a user