worker

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunScheduler added in v0.12.0

func RunScheduler(ctx context.Context, jobsSvc *manager.Service) error

RunScheduler ticks every 60s and dispatches RunCron for jobs whose cron expression matches the current minute. Blocks until ctx is cancelled. Caller must have already bootstrapped jobs on jobsSvc.

Exposed so a single-node entrypoint (server + worker in one process) can share one *manager.Service with the HTTP layer instead of running two competing schedulers — see cmd/lab/all.go.

Types

type Server

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

func NewServer

func NewServer() *Server

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

Run bootstraps jobs and starts the scheduler loop. Cancel ctx to stop. Returns nil on clean shutdown or the bootstrap error.

Jump to

Keyboard shortcuts

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