Creates and enqueues step execution rows for enrollments.
Summary
Functions
Moves a step execution back to scheduled state at a new time.
Creates and enqueues one step execution for an enrollment.
Calculates the next scheduled time for a step from its timing config.
Bulk seeds executions for active enrollments eligible for a step.
Functions
@spec reschedule(Ecto.Schema.t(), DateTime.t()) :: {:ok, Ecto.Schema.t()} | {:error, term()}
Moves a step execution back to scheduled state at a new time.
@spec schedule(Ecto.Schema.t(), Ecto.Schema.t(), keyword()) :: {:ok, Ecto.Schema.t()} | {:error, term()}
Creates and enqueues one step execution for an enrollment.
@spec scheduled_for(Ecto.Schema.t()) :: DateTime.t()
Calculates the next scheduled time for a step from its timing config.
@spec seed_for_step(Ecto.Schema.t(), DateTime.t(), keyword()) :: {:ok, [Ecto.Schema.t()]} | {:error, term()}
Bulk seeds executions for active enrollments eligible for a step.