Executor
This interface defines the contract for executing a single scheduled run. Implementations of this interface are responsible for processing a given trigger at a specific scheduled time.
Methods
Execute()
@classmethod
def Execute(
ctx: context.Context,
t: *models.Trigger,
scheduledAt: time.Time
) - > error
Executes a single scheduled run for a given trigger at a specified time. This method is used to initiate the processing associated with a particular scheduled event.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the execution, used for cancellation and carrying request-scoped values. |
| t | *models.Trigger | The trigger object that defines the scheduled event to be executed. |
| scheduledAt | time.Time | The specific time at which the trigger was scheduled to run. |
Returns
| Type | Description |
|---|---|
error | Returns an error if the execution fails, otherwise nil. |