dev@locazia: fix indexer

This commit is contained in:
user 2024-03-09 15:47:55 +03:00
parent e00a25f713
commit d9e725f7f2
1 changed files with 5 additions and 1 deletions

View File

@ -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"