Skip to main content

GarbageCollector

This class periodically deletes terminal TaskActions that have exceeded their TTL. It implements the controller-runtime manager.Runnable interface.

Methods


Start()

@classmethod
def Start(
ctx: context.Context
) - > error

Starts the garbage collection process, which periodically deletes terminal TaskActions that have exceeded their Time To Live (TTL). This method is part of the controller-runtime manager.Runnable interface.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for controlling cancellation and timeouts of the garbage collection operation.

Returns

TypeDescription
errorAn error if the garbage collection process fails to start or encounters issues during execution.

collect()

@classmethod
def collect(
ctx: context.Context
) - > error

Executes a single garbage collection run, identifying and deleting terminal TaskActions that have exceeded their configured Time To Live (TTL).

Parameters

NameTypeDescription
ctxcontext.ContextThe context for controlling cancellation and timeouts during the collection operation.

Returns

TypeDescription
errorAn error if the collection process encounters issues, such as problems listing or deleting TaskActions.