Documentation
¶
Overview ¶
Package local is the in-process cron Queue: a buffered channel feeding a fixed pool of worker goroutines. Single-node default — preserves the chassis's "fire and drain per dispatch" behavior, but bounds how many dispatches run at once (a fan-out of N slow tenants can't spawn N unbounded goroutines). Selected with --cron-queue=local (the default).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue is the in-process cron Queue.
func (*Queue) Enqueue ¶
Enqueue sends a job onto the buffered channel. Honors ctx so a shutting-down scheduler doesn't block forever on a full buffer (a full buffer is intended backpressure — the worker pool hasn't drained the previous fan-out).
func (*Queue) Work ¶
Work starts q.max worker goroutines, each pulling jobs and calling fn synchronously. Receiving a job off the channel is the at-most-one-worker guarantee — no separate semaphore, no goroutine-per-job. Work returns after ctx is cancelled and every worker has finished its current fn.