Skip to main content

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

NameTypeDescription
ctxcontext.ContextThe context for the execution, used for cancellation and carrying request-scoped values.
t*models.TriggerThe trigger object that defines the scheduled event to be executed.
scheduledAttime.TimeThe specific time at which the trigger was scheduled to run.

Returns

TypeDescription
errorReturns an error if the execution fails, otherwise nil.