removed logging from index since it was causing issues with migrations and missing logging groups

This commit is contained in:
Jonas Winkler 2020-11-07 23:26:18 +01:00
parent 51a4398969
commit 164be3cfed

View File

@ -68,7 +68,6 @@ def open_index(recreate=False):
def update_document(writer, doc): def update_document(writer, doc):
logging.getLogger(__name__).debug("Updating index with document{}".format(str(doc)))
writer.update_document( writer.update_document(
id=doc.pk, id=doc.pk,
title=doc.title, title=doc.title,
@ -86,7 +85,6 @@ def add_document_to_index(sender, instance, **kwargs):
@receiver(models.signals.post_delete, sender=Document) @receiver(models.signals.post_delete, sender=Document)
def remove_document_from_index(sender, instance, **kwargs): def remove_document_from_index(sender, instance, **kwargs):
logging.getLogger(__name__).debug("Removing document {} from index".format(str(instance)))
ix = open_index() ix = open_index()
with AsyncWriter(ix) as writer: with AsyncWriter(ix) as writer:
writer.delete_by_term('id', instance.pk) writer.delete_by_term('id', instance.pk)