postie

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Postie

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

func New

func New(
	ctx context.Context,
	cfg config.Config,
	poolManager *pool.Manager,
	jobProgress progress.JobProgress,
	queue QueueInterface,
) (*Postie, error)

func (*Postie) CleanupPar2Files added in v0.0.29

func (p *Postie) CleanupPar2Files(ctx context.Context, sourceFile fileinfo.FileInfo)

CleanupPar2Files removes PAR2 files for the given source file This method can be called when a job fails permanently to clean up orphaned PAR2 files

func (*Postie) Close added in v0.0.6

func (p *Postie) Close()

func (*Postie) ExecutePostUploadScript added in v0.0.29

func (p *Postie) ExecutePostUploadScript(ctx context.Context, nzbPath string, itemID string) error

ExecutePostUploadScript executes the post-upload script for a completed item This should be called after the file has been marked as completed in the database

func (*Postie) Post

func (p *Postie) Post(ctx context.Context, files []fileinfo.FileInfo, rootDir string, outputDir string, forceFolderMode bool) (string, error)

type QueueInterface added in v0.0.29

type QueueInterface interface {
	UpdateScriptStatus(ctx context.Context, itemID string, status string, retryCount int, lastError string, nextRetryAt *time.Time, firstFailureAt *time.Time) error
	MarkScriptCompleted(ctx context.Context, itemID string) error
}

QueueInterface defines the queue methods needed by Postie

Jump to

Keyboard shortcuts

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