check bioeb interval changes after sleep
This commit is contained in:
parent
023037ef61
commit
90874b9297
1 changed files with 5 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue