From d9e725f7f22ae0155cfdbc29a3d6ddfe339c4a19 Mon Sep 17 00:00:00 2001 From: user Date: Sat, 9 Mar 2024 15:47:55 +0300 Subject: [PATCH] dev@locazia: fix indexer --- app/core/background/indexer_service.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/core/background/indexer_service.py b/app/core/background/indexer_service.py index 32761f0..af2f675 100644 --- a/app/core/background/indexer_service.py +++ b/app/core/background/indexer_service.py @@ -112,9 +112,13 @@ async def indexer_loop(platform_found: bool, seqno: int) -> [bool, int]: encrypted_stored_content = session.query(StoredContent).filter( StoredContent.hash == item_content_hash_str, - StoredContent.type.like("local%") + # StoredContent.type.like("local%") ).first() if encrypted_stored_content: + if not encrypted_stored_content.type.startswith("local"): + make_log("Indexer", f"Item already indexed, but not local: {item_content_hash_str}", level="error") + return platform_found, seqno + encrypted_stored_content_meta = encrypted_stored_content.meta make_log("Indexer", f"Item already indexed: {item_content_hash_str}", level="debug") encrypted_stored_content.type = "onchain/content"