MCPcopy
hub / github.com/puma/puma-dev / restartMonitor

Method restartMonitor

dev/app.go:175–193  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

173}
174
175func (a *App) restartMonitor() error {
176 tmpDir := filepath.Join(a.dir, "tmp")
177 err := os.MkdirAll(tmpDir, 0755)
178 if err != nil {
179 return err
180 }
181
182 restart := filepath.Join(tmpDir, "restart.txt")
183
184 f, err := os.Create(restart)
185 if err != nil {
186 return err
187 }
188 f.Close()
189
190 return watch.Watch(restart, a.t.Dying(), func() {
191 a.Kill("restart.txt touched")
192 })
193}
194
195func (a *App) WaitTilReady() error {
196 select {

Callers

nothing calls this directly

Calls 2

KillMethod · 0.95
WatchFunction · 0.92

Tested by

no test coverage detected