worker

package
v0.0.0-...-838a368 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProcessCall

func ProcessCall(ctx context.Context, announcement *kv.Announcement, schedule *kv.Schedule, store kv.Storer, slackClient slack.Client, emailClient email.Client, dryRun bool) error

ProcessCall handles the processing of a single scheduled item, including rendering, sending, and updating its status.

Types

type Worker

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

Worker is responsible for polling for calls and sending them.

func New

func New(store kv.Storer, slackClient slack.Client, emailClient email.Client, poller *poller.Poller, scheduler *scheduler.Scheduler, refreshInterval time.Duration, dryRun bool) (*Worker, error)

New creates a new worker.

func (*Worker) ProcessMessages

func (w *Worker) ProcessMessages(ctx context.Context) error

ProcessMessages iterates through schedules and processes them.

func (*Worker) RefreshSources

func (w *Worker) RefreshSources(ctx context.Context) error

RefreshSources performs a poll for sources

func (*Worker) Run

func (w *Worker) Run(ctx context.Context) error

Run starts the worker.

func (*Worker) RunOnce

func (w *Worker) RunOnce(ctx context.Context) error

RunOnce performs a single poll for calls and sends them.

Jump to

Keyboard shortcuts

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