dlqbackoff

package module
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package dlqbackoff derives poisoned-repo DLQ-backoff deadlines from the journal: the one fold behind `tq pool-health`'s poisoned WARN + dlqBackoffUntil JSON field, the `tq dlq` row cross-links, and the webui dashboard's backoff panel — three surfaces, one journal truth. A repo whose latest still-standing dead letter is fresher than the backoff window and that has no completion on record is poisoned: work on it waits until lastDead+window (the harvest pool's Pacing verdict made queryable).

Index

Constants

View Source
const PoisonedAdvice = "fix the repo or rescue dead tasks"

PoisonedAdvice is the operator-advice tail shared by every poisoned line (`tq pool-health` WARN, `tq dlq` rows, the webui panel): one prose contract, so cross-surface greps and pins never drift.

Variables

This section is empty.

Functions

func Deadlines

func Deadlines(facts []journal.Fact, projectByID map[task.ID]string, now time.Time, window time.Duration) map[string]time.Time

Deadlines folds the journal into each repo's poisoned-repo backoff deadline: the latest still-standing dead letter extended by window, kept only while still in the future at now. Dismissal (a Cancelled fact on the dead-lettered task) takes a dead letter out of the derivation and any completion ever heals the repo — the same mirrors the harvester's table view applies. projectByID maps a task id to its repo (project); tasks without a repo are skipped. Nil when window is 0. The expiry boundary is the strict After here — pinned by TestDeadlinesBoundaryInstant.

func DeadlinesForStore

func DeadlinesForStore(
	ctx context.Context,
	store queue.Store,
	now time.Time,
	window time.Duration,
) (map[string]time.Time, error)

DeadlinesForStore is the store-backed seam under Deadlines for callers that hold a store and need only the deadline map (the webui snapshot loader, `tq dlq` rows): drains the journal, joins the task identities, folds. Nil without any journal I/O when window is 0.

Types

This section is empty.

Jump to

Keyboard shortcuts

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