Merge pull request #4692 from NousResearch/feat/ink-refactor
Feat/ink refactor
This commit is contained in:
@@ -64,6 +64,17 @@ WATCH_WINDOW_SECONDS = 10 # Rolling window length
|
||||
WATCH_OVERLOAD_KILL_SECONDS = 45 # Sustained overload duration before disabling watch
|
||||
|
||||
|
||||
def format_uptime_short(seconds: int) -> str:
|
||||
s = max(0, int(seconds))
|
||||
if s < 60:
|
||||
return f"{s}s"
|
||||
mins, secs = divmod(s, 60)
|
||||
if mins < 60:
|
||||
return f"{mins}m {secs}s"
|
||||
hours, mins = divmod(mins, 60)
|
||||
return f"{hours}h {mins}m"
|
||||
|
||||
|
||||
@dataclass
|
||||
class ProcessSession:
|
||||
"""A tracked background process with output buffering."""
|
||||
|
||||
Reference in New Issue
Block a user