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

Method SetMaxIterationsForInstance

internal/loop/manager.go:556–573  ·  view source on GitHub ↗

SetMaxIterationsForInstance updates max iterations for a specific running loop.

(name string, maxIter int)

Source from the content-addressed store, hash-verified

554
555// SetMaxIterationsForInstance updates max iterations for a specific running loop.
556func (m *Manager) SetMaxIterationsForInstance(name string, maxIter int) error {
557 m.mu.RLock()
558 instance, exists := m.instances[name]
559 m.mu.RUnlock()
560
561 if !exists {
562 return fmt.Errorf("PRD %s not found", name)
563 }
564
565 instance.mu.Lock()
566 defer instance.mu.Unlock()
567
568 if instance.Loop != nil {
569 instance.Loop.SetMaxIterations(maxIter)
570 }
571
572 return nil
573}

Callers 1

adjustMaxIterationsMethod · 0.80

Calls 1

SetMaxIterationsMethod · 0.45

Tested by

no test coverage detected