0.2.68
This commit is contained in:
@@ -174,6 +174,38 @@ type CandidateSource interface {
|
||||
Candidates(ctx context.Context) ([]Candidate, error)
|
||||
}
|
||||
|
||||
// ConfigurableCandidateSource accepts live operator tuning without rebuilding the worker.
|
||||
type ConfigurableCandidateSource interface {
|
||||
Configure(Config)
|
||||
}
|
||||
|
||||
// ScanAttempt is the durable operational account of one claimed candidate. Unlike the
|
||||
// queue, this is history rather than scheduling state, so retaining it does not turn the
|
||||
// worker into a persistent job system.
|
||||
type ScanAttempt struct {
|
||||
ItemID string
|
||||
SeriesID string
|
||||
Season int
|
||||
Episode int
|
||||
Reason string
|
||||
Priority int
|
||||
Outcome string
|
||||
MarkerMs int64
|
||||
Confidence float64
|
||||
Method string
|
||||
Frames int
|
||||
Error string
|
||||
StartedAt time.Time
|
||||
FinishedAt time.Time
|
||||
}
|
||||
|
||||
// HistoryRepository records completed scans and answers which speculative candidates are
|
||||
// still inside their retry cooldown.
|
||||
type HistoryRepository interface {
|
||||
SaveScanAttempt(ctx context.Context, attempt ScanAttempt) error
|
||||
RecentScanTimes(ctx context.Context, itemIDs []string, since time.Time) (map[string]time.Time, error)
|
||||
}
|
||||
|
||||
// Repository is the marker store. Narrow on purpose — the scheduler must not be able to
|
||||
// write anything else, because "one row per successful scan and nothing else" is the
|
||||
// performance claim this subsystem is making.
|
||||
|
||||
Reference in New Issue
Block a user