fix display log with actual seconds bioeb, and reduce time

This commit is contained in:
Your Name 2024-12-11 00:35:49 +03:00
parent 6cfb846e81
commit 0fa03940a0

View file

@ -423,9 +423,10 @@ async def main():
logger.debug( logger.debug(
f'latency avocado reply: {delta_avocado} secs') f'latency avocado reply: {delta_avocado} secs')
if delta_avocado > states.avocado_reply_timeout: if delta_avocado > states.avocado_reply_timeout:
interval_with_lag = rs + random.uniform(9.18299148, 40.9201412499)
logger.debug( logger.debug(
f'bioeb sleep [increased, because avocado have lag]: {rs}s') f'bioeb sleep [increased, because avocado have lag]: {interval_with_lag}s')
await asyncio.sleep(rs + random.uniform(34, 69)) await asyncio.sleep(interval_with_lag)
else: else:
logger.debug(f'bioeb sleep: {rs}s') logger.debug(f'bioeb sleep: {rs}s')
await asyncio.sleep(rs) await asyncio.sleep(rs)