scheduler

package
v0.3.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package scheduler runs TYPE copy pipes on their COPY_SCHEDULE cron expression — the async-execution half of gap #8 that GET /v0/jobs (internal/job) left deferred. It ticks once a minute, re-reading the live PipeRegistry each tick, so a project reload (SIGHUP) picks up schedule additions/edits without any restart or explicit resync logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scheduler

type Scheduler struct {
	// contains filtered or unexported fields
}

Scheduler triggers TYPE copy pipes whose COPY_SCHEDULE is due, via the same RunCopy path POST /v0/pipes/{name}/copy uses (so triggered runs are recorded through EnableJobs identically to on-demand ones).

func New

func New(pipes model.PipeRegistry, copier model.CopyRunner, log *slog.Logger) *Scheduler

New returns a Scheduler. It does nothing until Run is called.

func (*Scheduler) Run

func (s *Scheduler) Run(ctx context.Context)

Run blocks, checking for due copy pipes once a minute, until ctx is done.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL