MCPcopy Index your code
hub / github.com/dagucloud/dagu / DispatchTaskStore

Struct DispatchTaskStore

internal/persis/store/distributed_dispatch.go:52–62  ·  view source on GitHub ↗

DispatchTaskStore implements [exec.DispatchTaskStore] on top of a [persis.Collection]. Record IDs use "pending/" and "claims/" prefixes so a file collection rooted at the distributed directory uses the existing on-disk layout directly.

Source from the content-addressed store, hash-verified

50// file collection rooted at the distributed directory uses the existing
51// on-disk layout directly.
52type DispatchTaskStore struct {
53 col persis.Collection
54 reservationTTL time.Duration
55 admissionLeaseStore exec.DAGRunLeaseStore
56 admissionActiveRunStore exec.ActiveDistributedRunStore
57 lastReservationCleanupAt time.Time
58 index *dispatchTaskIndex
59 // mu serializes the in-process recycle+scan+claim sequence;
60 // per-record CompareAndDelete provides cross-process safety.
61 mu sync.Mutex
62}
63
64type dispatchTaskIndex struct {
65 pending map[string]dispatchTaskIndexEntry

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected