File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change 1616logger = logging .getLogger (__name__ )
1717
1818
19- # set default GQL query execution timeout to 30 seconds
20- EXECUTE_TIMEOUT = 30
19+ # set default GQL query execution timeout to 45 seconds
20+ EXECUTE_TIMEOUT = 45
2121
2222# set default GQL pagination
2323PAGINATION_WINDOWS = 1000
Original file line number Diff line number Diff line change @@ -115,16 +115,13 @@ async def process_network(
115115 current_timestamp = finalized_block ["timestamp" ]
116116
117117 latest_block_number = await get_latest_block_number (NETWORK )
118-
119- while not ( await has_synced_block ( NETWORK , latest_block_number )) :
118+ graphs_synced = await has_synced_block ( NETWORK , latest_block_number )
119+ if not graphs_synced :
120120 continue
121121
122122 voting_parameters = await get_voting_parameters (
123123 NETWORK , current_block_number
124124 )
125- # there is no consensus
126- if not voting_parameters :
127- return
128125
129126 await asyncio .gather (
130127 # check and update staking rewards
@@ -143,8 +140,8 @@ async def process_network(
143140 )
144141 except BaseException as e :
145142 logger .exception (e )
146-
147- await asyncio .sleep (ORACLE_PROCESS_INTERVAL )
143+ finally :
144+ await asyncio .sleep (ORACLE_PROCESS_INTERVAL )
148145
149146
150147if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments