worker

package
v0.0.0-...-b9cb2e6 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 64 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TorrentPusherQueue = IdQueue{
	// contains filtered or unexported fields
}
View Source
var WorkerDetailsById = map[string]*WorkerDetail{
	"parse-torrent": {
		Title: "Parse Torrent",
	},
	"push-torrent": {
		Title: "Push Torrent",
	},
	"crawl-store": {
		Title: "Crawl Store",
	},
	"sync-imdb": {
		Title: "Sync IMDB",
	},
	"sync-dmm-hashlist": {
		Title: "Sync DMM Hashlist",
	},
	"map-imdb-torrent": {
		Title: "Map IMDB Torrent",
	},
	"pull-magnet-cache": {
		Title: "Pull Magnet Cache",
	},
	"map-anime-id": {
		Title: "Map Anime ID",
	},
	"sync-animeapi": {
		Title: "Sync AnimeAPI",
	},
	"sync-anidb-titles": {
		Title: "Sync AniDB Titles",
	},
	"sync-anidb-tvdb-episode-map": {
		Title: "Sync AniDB-TVDB Episode Map",
	},
	"manami-anime-database": {
		Title: "Sync Manami Anime Database",
	},
	"map-anidb-torrent": {
		Title: "Map AniDB Torrent",
	},
	"sync-letterboxd-list": {
		Title: "Sync Letterboxd List",
	},
	"sync-bitmagnet": {
		Title: "Sync Bitmagnet",
	},
	"sync-animetosho": {
		Title: "Sync AnimeTosho",
	},
	"reload-linked-userdata-addon": {
		Title: "Reload Linked Userdata Addon",
	},
	"sync-stremio-trakt": {
		Title: "Sync Stremio-Trakt",
	},
	"sync-stremio-stremio": {
		Title: "Sync Stremio-Stremio",
	},
}

Functions

func InitWorkers

func InitWorkers() func()

Types

type DMMHashlistItem

type DMMHashlistItem struct {
	Filename string `json:"filename"`
	Hash     string `json:"hash"`
	Bytes    int64  `json:"bytes"`
}

type Error

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

func (Error) Error

func (e Error) Error() string

type IdQueue

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

func (*IdQueue) Queue

func (q *IdQueue) Queue(sid string)

type Job

type Job[T any] struct {
	Status string `json:"status"`
	Err    string `json:"err"`
	Data   *T     `json:"data,omitempty"`
}

type JobTracker

type JobTracker[T any] struct {
	// contains filtered or unexported fields
}

func NewJobTracker

func NewJobTracker[T any](name string, expiresIn time.Duration) *JobTracker[T]

func (JobTracker[T]) Get

func (t JobTracker[T]) Get(id string) (*Job[T], error)

func (JobTracker[T]) GetLast

func (t JobTracker[T]) GetLast() (*job_log.ParsedJobLog[T], error)

func (JobTracker[T]) IsRunning

func (t JobTracker[T]) IsRunning(id string) (bool, error)

func (JobTracker[T]) Set

func (t JobTracker[T]) Set(id string, status string, err string, data *T) error

type Worker

type Worker struct {
	Log *logger.Logger
	// contains filtered or unexported fields
}

func InitCrawlStoreWorker

func InitCrawlStoreWorker(conf *WorkerConfig) *Worker

func InitLinkedUserdataAddonReloaderWorker

func InitLinkedUserdataAddonReloaderWorker(conf *WorkerConfig) *Worker

func InitMagnetCachePullerWorker

func InitMagnetCachePullerWorker(conf *WorkerConfig) *Worker

func InitMapAniDBTorrentWorker

func InitMapAniDBTorrentWorker(conf *WorkerConfig) *Worker

func InitMapAnimeIdWorker

func InitMapAnimeIdWorker(conf *WorkerConfig) *Worker

func InitMapIMDBTorrentWorker

func InitMapIMDBTorrentWorker(conf *WorkerConfig) *Worker

func InitParseTorrentWorker

func InitParseTorrentWorker(conf *WorkerConfig) *Worker

func InitPushTorrentsWorker

func InitPushTorrentsWorker(conf *WorkerConfig) *Worker

func InitSyncAniDBTVDBEpisodeMapWorker

func InitSyncAniDBTVDBEpisodeMapWorker(conf *WorkerConfig) *Worker

func InitSyncAniDBTitlesWorker

func InitSyncAniDBTitlesWorker(conf *WorkerConfig) *Worker

func InitSyncAnimeAPIWorker

func InitSyncAnimeAPIWorker(conf *WorkerConfig) *Worker

func InitSyncAnimeToshoWorker

func InitSyncAnimeToshoWorker(conf *WorkerConfig) *Worker

func InitSyncBitmagnetWorker

func InitSyncBitmagnetWorker(conf *WorkerConfig) *Worker

func InitSyncDMMHashlistWorker

func InitSyncDMMHashlistWorker(conf *WorkerConfig) *Worker

func InitSyncIMDBWorker

func InitSyncIMDBWorker(conf *WorkerConfig) *Worker

func InitSyncLetterboxdList

func InitSyncLetterboxdList(conf *WorkerConfig) *Worker

func InitSyncManamiAnimeDatabaseWorker

func InitSyncManamiAnimeDatabaseWorker(conf *WorkerConfig) *Worker

func InitSyncStremioStremioWorker

func InitSyncStremioStremioWorker(conf *WorkerConfig) *Worker

func InitSyncStremioTraktWorker

func InitSyncStremioTraktWorker(conf *WorkerConfig) *Worker

func NewWorker

func NewWorker(conf *WorkerConfig) *Worker

type WorkerConfig

type WorkerConfig struct {
	Disabled          bool
	Executor          func(w *Worker) error
	Interval          time.Duration
	HeartbeatInterval time.Duration
	Log               *logger.Logger
	Name              string
	OnEnd             func()
	OnStart           func()
	RunAtStartupAfter time.Duration
	RunExclusive      bool
	ShouldSkip        func() bool
	ShouldWait        func() (bool, string)
}

type WorkerDetail

type WorkerDetail struct {
	Id       string        `json:"id"`
	Title    string        `json:"title"`
	Interval time.Duration `json:"interval"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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