diff --git a/src/autobioebbing.py b/src/autobioebbing.py index 919d762..7db737d 100644 --- a/src/autobioebbing.py +++ b/src/autobioebbing.py @@ -295,8 +295,13 @@ async def eb(client, c, conn, con, d, get_id, my_id, message_q): f'bioeb sleep [increased, because avocado have lag]: {interval_with_lag}s') await asyncio.sleep(interval_with_lag) else: + current_bioeb_sleep_interval = states.auto_bioeb_sleep_interval logger.debug(f'bioeb sleep: {rs}s') await asyncio.sleep(rs) + if states.auto_bioeb_sleep_interval != current_bioeb_sleep_interval: + add_delay = states.auto_bioeb_sleep_interval[0] + random.uniform(0.2352, 2.24885) + logger.debug(f'bioeb sleep interval change detected +{add_delay}s sleep') + await asyncio.sleep(add_delay) if len(e_info) <= 0: count, e_info = get_some_patients() if count < 2: