Skip to content

Commit

Permalink
Remove initial sleep wait
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjala committed Apr 17, 2024
1 parent 102c25d commit 2dce783
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions hsds/domain_sn.py
Original file line number Diff line number Diff line change
Expand Up @@ -903,17 +903,12 @@ async def PUT_Domain(request):
post_params["bucket"] = bucket
req_send_time = getNow(app)
log.debug(f"Sending rescan request at time {req_send_time}")
await http_post(app, notify_req, data={}, params=post_params)

# Poll until the scan_complete time is greater than
# req_send_time or 3 minutes have elapsed
max_scan_duration = int(config.get("max_scan_duration", default=180))
RESCAN_SLEEP_TIME = 0.1
INITIAL_SCAN_SLEEP_TIME = 0.4

# Start with brief wait to avoid time discrepancies between nodes
asyncio.sleep(INITIAL_SCAN_SLEEP_TIME)

await http_post(app, notify_req, data={}, params=post_params)

while True:
scan_time = await getScanTime(app, root_id, bucket=bucket)
Expand Down

0 comments on commit 2dce783

Please sign in to comment.