MCPcopy Create free account
hub / github.com/php/frankenphp / DrainWatcher

Function DrainWatcher

internal/watcher/watcher.go:89–103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

87}
88
89func DrainWatcher() {
90 if !watcherIsActive.Load() {
91 return
92 }
93
94 watcherIsActive.Store(false)
95
96 if globalLogger.Enabled(globalCtx, slog.LevelDebug) {
97 globalLogger.LogAttrs(globalCtx, slog.LevelDebug, "stopping watcher")
98 }
99
100 activeWatcher.stopWatching()
101 reloadWaitGroup.Wait()
102 activeWatcher = nil
103}
104
105// TODO: how to test this?
106func (p *pattern) retryWatching() {

Callers 1

drainWatchersFunction · 0.92

Calls 1

stopWatchingMethod · 0.80

Tested by

no test coverage detected