Documentation
¶
Index ¶
- func CalcNewNext(schedule string, now time.Time) (time.Time, error)
- func CreatePipeline(ctx context.Context, store store.Store, cron *model.Cron) (*model.Repo, *model.Pipeline, error)
- func Run(ctx context.Context, store store.Store, lockService *lock.Service, ...) error
- func RunSweeper(ctx context.Context, s store.Store, q queue.Queue, interval time.Duration)
- func SweepExpiredApprovals(ctx context.Context, s store.Store, q queue.Queue)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalcNewNext ¶
CalcNewNext parses a cron string and calculates the next exec time based on it.
func CreatePipeline ¶
func Run ¶
func Run(ctx context.Context, store store.Store, lockService *lock.Service, leaderLockTTL time.Duration) error
Run starts the cron scheduler with persistent leadership.
func RunSweeper ¶
RunSweeper runs SweepExpiredApprovals on the given interval until ctx is done. The first sweep fires immediately so a server that has been down across an approval deadline does not have to wait one full interval before expiring stale gates.
func SweepExpiredApprovals ¶
SweepExpiredApprovals scans for workflow approval gates whose deadline has passed and transitions them to the Expired state via pipeline.ExpireWorkflow. Safe to call repeatedly from a goroutine; the index on (approval_state, approval_deadline) makes each call cheap when there are no expired gates to process.
Types ¶
This section is empty.