Skip to content

Commit

Permalink
feat: small changes after self peer review
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel1302 committed Jul 29, 2023
1 parent 1de5fa9 commit 61eab43
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vega_sim/api/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def wait_for_datanode_sync(
core_time = retry(10, 0.5, lambda: core_data_client.GetVegaTime(GetVegaTimeRequest()).timestamp)
trading_time = retry(10, 0.5, lambda: trading_data_client.GetVegaTime(GetVegaTimeRequest()).timestamp)
while core_time > trading_time:
logging.info(f"Sleeping in wait_for_datanode_sync for {0.05 * 1.03**attempts}")
logging.debug(f"Sleeping in wait_for_datanode_sync for {0.05 * 1.03**attempts}")
time.sleep(0.05 * 1.03**attempts)
try:
trading_time = retry(10, 2.0, lambda: trading_data_client.GetVegaTime(GetVegaTimeRequest()).timestamp)
Expand Down Expand Up @@ -103,10 +103,10 @@ def wait_for_core_catchup(
core_time_two = retry(10, 0.5, lambda: core_data_client.GetVegaTime(GetVegaTimeRequest()).timestamp)

while core_time != core_time_two:
logging.info(f"Sleeping in wait_for_core_catchup for {0.05 * 1.03**attempts}")
logging.debug(f"Sleeping in wait_for_core_catchup for {0.05 * 1.03**attempts}")

core_time = retry(10, 0.5, lambda: core_data_client.GetVegaTime(GetVegaTimeRequest()).timestamp)
time.sleep(0.05 * 1.1**attempts)
time.sleep(0.05 * 1.03**attempts)
core_time_two = retry(10, 0.5, lambda: core_data_client.GetVegaTime(GetVegaTimeRequest()).timestamp)
attempts += 1
if attempts >= max_retries:
Expand Down

0 comments on commit 61eab43

Please sign in to comment.