Skip to content

Commit 9366af1

Browse files
Add sleep to block scanner chunk failure handler
1 parent ac72bb0 commit 9366af1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/block_scanner.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,11 @@ def __call__(self):
5454
)
5555
self.set_last_seen_block_num(blocks.stop - 1)
5656
else:
57+
chunk_retry_sleep_period = 5
5758
logger.info(
58-
f"Some blocks failed, retrying chunk {blocks.start} - {blocks.stop - 1}"
59+
f"Some blocks failed, retrying chunk {blocks.start} - {blocks.stop - 1} after {chunk_retry_sleep_period}s"
5960
)
61+
time.sleep(chunk_retry_sleep_period)
6062
except NoServerSet:
6163
time.sleep(1)
6264
except Exception as e:

0 commit comments

Comments
 (0)