MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / Pause

Method Pause

internal/loop/manager.go:338–359  ·  view source on GitHub ↗

Pause pauses the loop for a specific PRD (stops after current iteration).

(name string)

Source from the content-addressed store, hash-verified

336
337// Pause pauses the loop for a specific PRD (stops after current iteration).
338func (m *Manager) Pause(name string) error {
339 m.mu.RLock()
340 instance, exists := m.instances[name]
341 m.mu.RUnlock()
342
343 if !exists {
344 return fmt.Errorf("PRD %s not found", name)
345 }
346
347 instance.mu.Lock()
348 defer instance.mu.Unlock()
349
350 if instance.State != LoopStateRunning {
351 return fmt.Errorf("PRD %s is not running", name)
352 }
353
354 if instance.Loop != nil {
355 instance.Loop.Pause()
356 }
357
358 return nil
359}
360
361// Stop stops the loop for a specific PRD immediately.
362func (m *Manager) Stop(name string) error {

Callers 1

Calls

no outgoing calls

Tested by 1