mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-22 18:09:46 +01:00
feat(artwork): read a single queue row by item
The explain CLI must report whether an item is queued, at what priority and when it retries; the queue repository could only be drained in eligibility batches, which cannot see a row that is still backing off.
This commit is contained in:
parent
e3c78a9cb1
commit
5ba8a9fcb5
4 changed files with 41 additions and 0 deletions
|
|
@ -119,6 +119,8 @@ type ArtworkRepository interface {
|
|||
}
|
||||
|
||||
type ArtworkQueueRepository interface {
|
||||
// Get returns the pending row for an item, or ErrNotFound when it is not queued.
|
||||
Get(kind Kind, id, imageType string) (*ArtworkQueueItem, error)
|
||||
// Enqueue upserts; an existing row keeps the higher priority and has its retry_at reset.
|
||||
Enqueue(items ...ArtworkQueueItem) error
|
||||
// EnqueuePreservingBackoff upserts like Enqueue but preserves an existing row's retry_at, so a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue