Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
Store storage.ScheduledJobStorage
Runs storage.ScheduledRunStorage
OnRunEvent func(domain.ScheduledJob, domain.RunEvent)
ExecCommand agentrunner.ExecFunc
BinaryPath string
}
Options bundles dependencies and configuration for NewService.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service runs scheduled jobs inside the `infer daemon` process. Jobs are loaded from the configured ScheduledJobStorage, registered with a robfig/cron scheduler, and hot-reloaded by polling the storage and diffing (reconcile).
On fire, a fresh `infer headless --session-id <uuid>` subprocess is spawned - every fire gets a brand-new session, so no context carries between runs. A RunRecord is persisted per fire (keyed by that session ID, so the run's conversation is discoverable from storage), and progress is emitted through the optional OnRunEvent hook. The scheduler knows nothing about channels - delivery is a subscriber concern (see services.ScheduleNotifier).
func NewService ¶
NewService constructs a Service. Returns an error if required deps are missing.
func (*Service) ParseCron ¶
ParseCron exposes the same parser the service uses, so the Schedule tool can validate cron expressions identically before persisting them.