Skip to content

Commit d8c25c8

Browse files
committed
added timeout to the batch commit
1 parent 3772ca2 commit d8c25c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/script_lighthouse.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,13 @@ def execute_query_and_insert_result(start_date, end_date):
133133

134134
# Commit the batch at every 500th record.
135135
if idx == 499:
136-
batch.commit()
136+
batch.commit(timeout=36000)
137137
# Start a new batch for the next iteration.
138138
batch = firestore_client.batch()
139139
print(datetime.now())
140140
idx = 0
141141

142-
batch.commit()
142+
batch.commit(timeout=36000)
143143
print("Data insert finsihed successfully.")
144144

145145
# Get command-line arguments

0 commit comments

Comments
 (0)