MCPcopy
hub / github.com/netdata/netdata / waitForJobs

Function waitForJobs

src/go/cmd/godplugin/main.go:362–373  ·  view source on GitHub ↗
(ctx context.Context, mgr *jobmgr.Manager, moduleName string)

Source from the content-addressed store, hash-verified

360}
361
362func waitForJobs(ctx context.Context, mgr *jobmgr.Manager, moduleName string) error {
363 for {
364 if len(mgr.GetJobNames(moduleName)) > 0 {
365 return nil
366 }
367 select {
368 case <-ctx.Done():
369 return fmt.Errorf("no jobs started for module '%s'", moduleName)
370 case <-time.After(100 * time.Millisecond):
371 }
372 }
373}
374
375func writeFunctionError(status int, format string, args ...any) {
376 resp := map[string]any{

Callers 1

runFunctionCLIFunction · 0.85

Calls 2

ErrorfMethod · 0.65
GetJobNamesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…