MCPcopy Create free account
hub / github.com/PostHog/duckgres / SetMaxWorkers

Method SetMaxWorkers

controlplane/worker_mgr.go:1038–1042  ·  view source on GitHub ↗

SetMaxWorkers updates the maximum number of workers. 0 means unlimited.

(n int)

Source from the content-addressed store, hash-verified

1036 _ = w.cmd.Process.Signal(os.Interrupt)
1037 }
1038
1039 // Wait up to 3s for graceful exit. The worker just had its session
1040 // destroyed and should exit almost immediately.
1041 select {
1042 case <-w.done:
1043 case <-time.After(3 * time.Second):
1044 slog.Warn("Worker did not exit in time, killing.", "id", w.ID)
1045 if w.cmd != nil && w.cmd.Process != nil {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected