MCPcopy
hub / github.com/argoproj/argo-workflows / killContainers

Method killContainers

workflow/executor/executor.go:1348–1355  ·  view source on GitHub ↗
(ctx context.Context, containerNames []string)

Source from the content-addressed store, hash-verified

1346}
1347
1348func (we *WorkflowExecutor) killContainers(ctx context.Context, containerNames []string) {
1349 logger := logging.RequireLoggerFromContext(ctx)
1350 logger.WithField("containerNames", containerNames).Info(ctx, "Killing containers")
1351 terminationGracePeriodDuration := GetTerminationGracePeriodDuration()
1352 if err := we.RuntimeExecutor.Kill(ctx, containerNames, terminationGracePeriodDuration); err != nil {
1353 logger.WithField("containerNames", containerNames).WithError(err).Warn(ctx, "Failed to kill")
1354 }
1355}
1356
1357func (we *WorkflowExecutor) Init() error {
1358 if i, ok := we.RuntimeExecutor.(Initializer); ok {

Callers 1

monitorDeadlineMethod · 0.95

Calls 7

RequireLoggerFromContextFunction · 0.92
InfoMethod · 0.65
WithFieldMethod · 0.65
KillMethod · 0.65
WarnMethod · 0.65
WithErrorMethod · 0.65

Tested by

no test coverage detected