MCPcopy Create free account
hub / github.com/Ark0N/Codeman / executeWhenIdle

Function executeWhenIdle

src/session-auto-ops.ts:52–89  ·  view source on GitHub ↗

* Executes an action when the session becomes idle, retrying if currently working. * * @param action - The async action to execute once idle * @param isActive - Returns whether this operation is still active (not cancelled) * @param isWorking - Returns whether the session is currently working *

(
  action: () => Promise<void>,
  isActive: () => boolean,
  isWorking: () => boolean,
  isStopped: () => boolean,
  retryMs: number,
  cooldownMs: number,
  setTimer: (timer: NodeJS.Timeout | null) => void,
  onCooldownDone: () => void
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

checkAutoCompactMethod · 0.85
checkAutoClearMethod · 0.85

Calls 2

isActiveFunction · 0.85
isWorkingFunction · 0.85

Tested by

no test coverage detected