Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions core/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,10 @@ async def main() -> None:
await asyncio.sleep(10)
continue

if datetime.now(tz=UTC) - litter_box.last_seen > timedelta(minutes=10):
logger.warning("Litter box not seen in the last 10 minutes", last_seen=litter_box.last_seen)
await asyncio.sleep(10)
now = datetime.now(tz=UTC)
if now - litter_box.last_seen > timedelta(minutes=10):
logger.warning("Litter box not seen in the last 10 minutes", last_seen=litter_box.last_seen, now=now)
await asyncio.sleep(60)
continue

logger.info(
Expand Down
Loading