Update idle time configuration and documentation

- Increased default values for IDLE_MINUTES from 30 to 60 and IDLE_GRACE_MINUTES from 45 to 90 across configuration files and documentation.
- Updated related documentation to reflect the new default idle time settings, ensuring consistency in user guidance and system behavior.
This commit is contained in:
Leonid Pershin
2026-08-21 07:24:09 +03:00
parent 000661e04f
commit 7343fb0e83
11 changed files with 17 additions and 17 deletions
+3 -3
View File
@@ -18,7 +18,7 @@ ARMED = DATA / ".gpu-rent-killer-armed"
LOG = DATA / ".gpu-rent-killer.log"
SERVER_ID_FILE = DATA / ".gpu-rent-server-id"
# After this many seconds of continuous Swarm unreachable → treat as idle (don't bill forever).
SWARM_UNREACHABLE_IDLE_SEC = 60 * 60
SWARM_UNREACHABLE_IDLE_SEC = 2 * 60 * 60
def log(msg: str) -> None:
@@ -242,7 +242,7 @@ def main() -> int:
now = time.time()
grace_from = float(creds.get("grace_from") or 0)
grace_minutes = float(creds.get("grace_minutes") or 45)
grace_minutes = float(creds.get("grace_minutes") or 90)
if now < grace_from + grace_minutes * 60:
left = int(grace_from + grace_minutes * 60 - now)
log(f"grace {left}s left")
@@ -269,7 +269,7 @@ def main() -> int:
log(f"busy: {llm_detail}")
return 0
idle_minutes = float(creds.get("idle_minutes") or 30)
idle_minutes = float(creds.get("idle_minutes") or 60)
since = read_ts(IDLE_SINCE)
if since is None:
write_ts(IDLE_SINCE, now)