def update_es(sender, instance, **kwargs): doc = instance.to_search() print(doc) print("last_fetch", instance.last_fetch) if instance.error or not instance.last_fetch: es_retry(doc.delete, _ignore_not_found=True) else: es_retry(doc.save)
def delete_from_es(sender, instance, **kwargs): doc = instance.to_search() es_retry(doc.delete, _ignore_not_found=True)
def update_es(sender, instance, **kwargs): doc = instance.to_search() es_retry(doc.save)