Update idle time configuration to improve resource management
- Reduced default values for IDLE_MINUTES from 60 to 30 and IDLE_GRACE_MINUTES from 90 to 45 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:
@@ -255,8 +255,8 @@ def load_config(*, require_auth: bool = True) -> Config:
|
||||
scan_pools=(os.environ.get("SCAN_POOLS") or "ru-6,ru-7").strip(),
|
||||
default_spot=_as_bool(os.environ.get("DEFAULT_SPOT"), True),
|
||||
keep_floating_ip=_as_bool(os.environ.get("KEEP_FLOATING_IP"), False),
|
||||
idle_minutes=_as_int(os.environ.get("IDLE_MINUTES"), 60),
|
||||
idle_grace_minutes=_as_int(os.environ.get("IDLE_GRACE_MINUTES"), 90),
|
||||
idle_minutes=_as_int(os.environ.get("IDLE_MINUTES"), 30),
|
||||
idle_grace_minutes=_as_int(os.environ.get("IDLE_GRACE_MINUTES"), 45),
|
||||
pull_output=_as_bool(os.environ.get("PULL_OUTPUT"), False),
|
||||
notify_ready=_as_bool(os.environ.get("NOTIFY_READY"), True),
|
||||
# Default on: failed up must not leave a billing GPU running.
|
||||
|
||||
@@ -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 90)
|
||||
grace_minutes = float(creds.get("grace_minutes") or 45)
|
||||
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 60)
|
||||
idle_minutes = float(creds.get("idle_minutes") or 30)
|
||||
since = read_ts(IDLE_SINCE)
|
||||
if since is None:
|
||||
write_ts(IDLE_SINCE, now)
|
||||
|
||||
Reference in New Issue
Block a user