diff --git a/app/events.py b/app/events.py index 4e07d68..7bf007f 100644 --- a/app/events.py +++ b/app/events.py @@ -103,10 +103,9 @@ def events_listener(): except Exception as e: sleep_sec = 60 logger.exception(f"Exception in main block scanner loop: {e}") - logger.warning(f"Waiting {sleep_sec} seconds before retry.") - logger.warning(f'Last block in blockchain is {w3.eth.block_number}. - If this is the current block in the blockchain - - add the environment variable LAST_BLOCK_LOCKED = "False" to the deployment') + current_block_number = w3.eth.block_number + logger.warning(f'Last block in blockchain is {current_block_number}.If this is the current block in the blockchain - add the environment variable LAST_BLOCK_LOCKED = "False" to the deployment') + logger.warning(f"Waiting {sleep_sec} seconds before retry.") time.sleep(sleep_sec)