fix: Adjust memory thresholds for Discord message sending to match device capabilities

This commit is contained in:
2025-11-15 09:46:22 -05:00
parent c6f46e097b
commit 4400fb5a74
2 changed files with 3 additions and 3 deletions

View File

@@ -56,8 +56,8 @@ def send_discord_message(message, username="Auto Garden Bot", is_alert=False):
# 1b) quick mem check - avoid importing urequests/TLS when too low
try:
mem = getattr(gc, "mem_free", lambda: None)()
# raised threshold to reduce chance of spike during TLS/requests
if mem is not None and mem < 140000:
# lower threshold to match this board's free heap (~100 KB observed)
if mem is not None and mem < 90000:
return False
except:
pass