sqlitejob

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore(dbPath, blobDir string) (*Store, error)

func (*Store) ClearQueueHistory

func (s *Store) ClearQueueHistory(ctx context.Context, statuses []domain.JobStatus) (int64, error)

func (*Store) Close

func (s *Store) Close() error

func (*Store) DeleteQueueItems

func (s *Store) DeleteQueueItems(ctx context.Context, ids []string) (int64, error)

func (*Store) ExpectedSchemaVersion

func (s *Store) ExpectedSchemaVersion() int

func (*Store) GetActiveQueueItems

func (s *Store) GetActiveQueueItems(ctx context.Context) ([]*domain.QueueItem, error)

GetActiveQueueItems returns all jobs that are not in a terminal state (Completed/Failed).

func (*Store) GetAggregatorReleaseCacheByID

func (s *Store) GetAggregatorReleaseCacheByID(ctx context.Context, id string) (*domain.Release, error)

GetAggregatorReleaseCacheByID returns one cached release by release id.

func (*Store) GetQueueEvents

func (s *Store) GetQueueEvents(ctx context.Context, queueID string) ([]*domain.QueueItemEvent, error)

func (*Store) GetQueueItem

func (s *Store) GetQueueItem(ctx context.Context, id string) (*domain.QueueItem, error)

GetQueueItem fetches a single job by its ID, fully hydrated with its Release.

func (*Store) GetQueueItemFiles

func (s *Store) GetQueueItemFiles(ctx context.Context, queueItemID string) ([]*domain.DownloadFile, error)

func (*Store) GetQueueItems

func (s *Store) GetQueueItems(ctx context.Context) ([]*domain.QueueItem, error)

GetQueueItems returns all items in the queue, ordered by creation date.

func (*Store) MarkReleaseCacheMissing

func (s *Store) MarkReleaseCacheMissing(ctx context.Context, releaseID, reason string) error

func (*Store) MarkReleaseCached

func (s *Store) MarkReleaseCached(ctx context.Context, releaseID string, blobSize int64, blobMtimeUnix int64) error

func (*Store) Ping

func (s *Store) Ping(ctx context.Context) error

func (*Store) ReconcileBlobCacheIndex

func (s *Store) ReconcileBlobCacheIndex(ctx context.Context) error

func (*Store) ReconcileReleaseCache

func (s *Store) ReconcileReleaseCache(ctx context.Context) error

func (*Store) ResetStuckQueueItems

func (s *Store) ResetStuckQueueItems(ctx context.Context, newStatus domain.JobStatus, oldStatuses ...domain.JobStatus) error

func (*Store) RunMigrations

func (s *Store) RunMigrations() error

func (*Store) SaveQueueEvent

func (s *Store) SaveQueueEvent(ctx context.Context, ev *domain.QueueItemEvent) error

func (*Store) SaveQueueItem

func (s *Store) SaveQueueItem(ctx context.Context, item *domain.QueueItem) error

func (*Store) SaveQueueItemFiles

func (s *Store) SaveQueueItemFiles(ctx context.Context, queueItemID string, files []*domain.DownloadFile) error

func (*Store) SchemaVersion

func (s *Store) SchemaVersion(ctx context.Context) (int, error)

func (*Store) SearchAggregatorReleaseCache

func (s *Store) SearchAggregatorReleaseCache(ctx context.Context, query string, limit int) ([]*domain.Release, error)

SearchAggregatorReleaseCache searches cached releases by title.

func (*Store) UpsertAggregatorReleaseCache

func (s *Store) UpsertAggregatorReleaseCache(ctx context.Context, releases []*domain.Release) error

UpsertAggregatorReleaseCache stores/replaces release cache entries for Aggregator queries.

func (*Store) ValidateSchema

func (s *Store) ValidateSchema(ctx context.Context) error

Jump to

Keyboard shortcuts

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