Versions in this module Expand all Collapse all v0 v0.1.0 May 10, 2026 Changes in this version + const NotifyChannel + var ErrPoison = errors.New("worker: poison job") + func Backoff(attempts int, jitter func() float64) time.Duration + func Enqueue(ctx context.Context, db DBTX, kind Kind, payload any, opts EnqueueOptions) (int64, error) + func Notify(ctx context.Context, db DBTX) error + func PoisonError(cause error) error + type DBTX = workerdb.DBTX + type EnqueueOptions struct + MaxAttempts int32 + RunAt pgtype.Timestamptz + type Handler func(ctx context.Context, payload json.RawMessage) error + type Kind string + const KindJobsPurge + const KindLifecycleSweep + const KindNotifyFanout + const KindPRMergeability + const KindPRSynchronize + const KindPushProcess + const KindRepoForkClone + const KindRepoIndexCode + const KindRepoIndexReconcile + const KindRepoSizeRecalc + type Pool struct + func NewPool(db *pgxpool.Pool, cfg PoolConfig) *Pool + func (p *Pool) Register(kind Kind, h Handler) + func (p *Pool) Run(ctx context.Context) error + type PoolConfig struct + IdlePoll time.Duration + InstanceID string + JobTimeout time.Duration + Logger *slog.Logger + Workers int