Merge pull request #815 from moonstream-to/fix-historical-function-crawl

Fix historical function crawl
pull/816/head
Andrey Dolgolev 2023-06-13 00:34:33 +03:00 zatwierdzone przez GitHub
commit 0a73a800d2
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 8 dodań i 1 usunięć

Wyświetl plik

@ -341,6 +341,12 @@ def merge_event_crawl_jobs(
if contract not in old_crawl_job.contracts
]
)
for contract_address, entries in new_crawl_job.address_entries.items():
if contract_address in old_crawl_job.address_entries:
old_crawl_job.address_entries[contract_address].update(entries)
else:
old_crawl_job.address_entries[contract_address] = entries
break
else:
old_crawl_jobs.append(new_crawl_job)
@ -361,6 +367,7 @@ def merge_function_call_crawl_jobs(
old_crawl_jobs will be modified
Returns:
Merged list of function call crawl jobs
"""
for new_crawl_job in new_function_call_crawl_jobs:
for old_crawl_job in old_crawl_jobs:
@ -637,7 +644,7 @@ def update_entries_status_and_progress(
entries_tags_delete,
entries_tags_add,
) = add_progress_to_tags(
entries=entries_ids,
entries=event.entries_tags,
contract_progress=progress,
entries_tags_delete=entries_tags_delete,
entries_tags_add=entries_tags_add,