moved commit back to interval

pull/618/head
Yhtyyar Sahatov 2022-05-26 17:22:45 +03:00
rodzic d25b4d6866
commit 7c80be419b
1 zmienionych plików z 2 dodań i 4 usunięć

Wyświetl plik

@ -232,9 +232,6 @@ def continuous_crawler(
db_session, all_function_calls, blockchain_type
)
# Commiting to db
commit_session(db_session)
current_time = datetime.utcnow()
if current_time - jobs_refetchet_time > timedelta(
@ -251,7 +248,8 @@ def continuous_crawler(
if current_time - last_heartbeat_time > timedelta(
seconds=heartbeat_interval
):
# Commiting to db
commit_session(db_session)
# Update heartbeat
heartbeat_template["last_block"] = end_block
heartbeat_template["current_time"] = _date_to_str(current_time)