MCPcopy Create free account
hub / github.com/JordanCoin/codemap / waitForDaemonState

Function waitForDaemonState

cmd/hooks.go:217–226  ·  view source on GitHub ↗
(root string, timeout time.Duration)

Source from the content-addressed store, hash-verified

215}
216
217func waitForDaemonState(root string, timeout time.Duration) *watch.State {
218 deadline := time.Now().Add(timeout)
219 for time.Now().Before(deadline) {
220 if state := watch.ReadState(root); state != nil {
221 return state
222 }
223 time.Sleep(100 * time.Millisecond)
224 }
225 return nil
226}
227
228// RunHook executes the named hook with the given project root
229func RunHook(hookName, root string) error {

Callers 2

hookSessionStartFunction · 0.85
TestWaitForDaemonStateFunction · 0.85

Calls 1

ReadStateFunction · 0.92

Tested by 1

TestWaitForDaemonStateFunction · 0.68