kopia lustrzana https://github.com/bugout-dev/moonstream
moved commit_session out of heart beat interval
rodzic
5dc7716343
commit
d25b4d6866
|
@ -232,6 +232,9 @@ def continuous_crawler(
|
||||||
db_session, all_function_calls, blockchain_type
|
db_session, all_function_calls, blockchain_type
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Commiting to db
|
||||||
|
commit_session(db_session)
|
||||||
|
|
||||||
current_time = datetime.utcnow()
|
current_time = datetime.utcnow()
|
||||||
|
|
||||||
if current_time - jobs_refetchet_time > timedelta(
|
if current_time - jobs_refetchet_time > timedelta(
|
||||||
|
@ -248,8 +251,6 @@ def continuous_crawler(
|
||||||
if current_time - last_heartbeat_time > timedelta(
|
if current_time - last_heartbeat_time > timedelta(
|
||||||
seconds=heartbeat_interval
|
seconds=heartbeat_interval
|
||||||
):
|
):
|
||||||
# Commiting to db
|
|
||||||
commit_session(db_session)
|
|
||||||
|
|
||||||
# Update heartbeat
|
# Update heartbeat
|
||||||
heartbeat_template["last_block"] = end_block
|
heartbeat_template["last_block"] = end_block
|
||||||
|
|
Ładowanie…
Reference in New Issue