Beispiel #1
0
def handler_index_document(sender, **kwargs):
    task_index_document.apply_async(kwargs=dict(
        document_id=kwargs['instance'].document.pk))
Beispiel #2
0
def handler_index_document(sender, **kwargs):
    if kwargs['action'] in ('post_add', 'post_remove'):
        for pk in kwargs['pk_set']:
            task_index_document.apply_async(kwargs=dict(document_id=pk))