fix(opencode): expire stale host leases on startup
This commit is contained in:
parent
84412066e8
commit
5c5b5c7afc
2 changed files with 2 additions and 0 deletions
|
|
@ -289,6 +289,7 @@ async function cleanupOpenCodeHostsForLifecycle(reason: 'startup' | 'shutdown'):
|
||||||
reason,
|
reason,
|
||||||
mode: reason === 'shutdown' ? 'force' : 'stale',
|
mode: reason === 'shutdown' ? 'force' : 'stale',
|
||||||
staleAgeMs: reason === 'startup' ? 5 * 60_000 : null,
|
staleAgeMs: reason === 'startup' ? 5 * 60_000 : null,
|
||||||
|
leaseStaleAgeMs: reason === 'startup' ? 24 * 60 * 60_000 : null,
|
||||||
});
|
});
|
||||||
if (result.cleaned > 0) {
|
if (result.cleaned > 0) {
|
||||||
logger.info(
|
logger.info(
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,7 @@ export interface OpenCodeCleanupHostsCommandBody {
|
||||||
mode?: 'stale' | 'force';
|
mode?: 'stale' | 'force';
|
||||||
projectPath?: string;
|
projectPath?: string;
|
||||||
staleAgeMs?: number | null;
|
staleAgeMs?: number | null;
|
||||||
|
leaseStaleAgeMs?: number | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface OpenCodeCleanupHostsCommandData {
|
export interface OpenCodeCleanupHostsCommandData {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue