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
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for controlling cancellation and timeouts of the garbage collection operation. |
Returns
| Type | Description |
|---|---|
error | An 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
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for controlling cancellation and timeouts during the collection operation. |
Returns
| Type | Description |
|---|---|
error | An error if the collection process encounters issues, such as problems listing or deleting TaskActions. |