Documentation
¶
Index ¶
- type PostCheckRetryWorker
- type Processor
- func (p *Processor) CancelJob(jobID string) error
- func (p *Processor) Close() error
- func (p *Processor) GetAutoPauseReason() string
- func (p *Processor) GetRunningJobDetails() map[string]RunningJobDetails
- func (p *Processor) GetRunningJobItems() []RunningJobItem
- func (p *Processor) GetRunningJobs() map[string]bool
- func (p *Processor) IsAutoPaused() bool
- func (p *Processor) IsPathBeingProcessed(path string) bool
- func (p *Processor) IsPaused() bool
- func (p *Processor) PauseProcessing()
- func (p *Processor) ResumeProcessing()
- func (p *Processor) Start(ctx context.Context) error
- type ProcessorOptions
- type RunningJob
- type RunningJobDetails
- type RunningJobItem
- type ScriptRetryWorker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostCheckRetryWorker ¶ added in v0.0.29
type PostCheckRetryWorker struct {
// contains filtered or unexported fields
}
PostCheckRetryWorker handles deferred article verification via STAT checks. When immediate post-check verification fails after all retries, articles are stored in the database and this worker periodically rechecks them with exponential backoff.
func NewPostCheckRetryWorker ¶ added in v0.0.29
func NewPostCheckRetryWorker( ctx context.Context, q postCheckQueue, checkPool pool.NNTPClient, cfg config.PostCheck, ) *PostCheckRetryWorker
NewPostCheckRetryWorker creates a new post check retry worker
func (*PostCheckRetryWorker) GetFailureReason ¶ added in v0.0.29
func (w *PostCheckRetryWorker) GetFailureReason(retryCount int) string
GetFailureReason returns a human-readable reason for why retries stopped
func (*PostCheckRetryWorker) Start ¶ added in v0.0.29
func (w *PostCheckRetryWorker) Start()
Start begins the retry worker loop
func (*PostCheckRetryWorker) Stop ¶ added in v0.0.29
func (w *PostCheckRetryWorker) Stop()
Stop stops the retry worker
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
func New ¶
func New(opts ProcessorOptions) *Processor
func (*Processor) GetAutoPauseReason ¶ added in v0.0.20
GetAutoPauseReason returns the reason for automatic pause, if any
func (*Processor) GetRunningJobDetails ¶
func (p *Processor) GetRunningJobDetails() map[string]RunningJobDetails
GetRunningJobDetails returns detailed information about currently running jobs
func (*Processor) GetRunningJobItems ¶
func (p *Processor) GetRunningJobItems() []RunningJobItem
GetRunningJobItems returns detailed information about currently running jobs
func (*Processor) GetRunningJobs ¶
GetRunningJobs returns a map of currently running job IDs
func (*Processor) IsAutoPaused ¶ added in v0.0.20
IsAutoPaused returns true if the processor was automatically paused due to provider unavailability
func (*Processor) IsPathBeingProcessed ¶
IsPathBeingProcessed checks if a file path is currently being processed. It checks both reserved paths (claimed but not yet in runningJobs) and running jobs. For folder mode (paths with FOLDER: prefix), it also checks if the path is within a folder that is being processed.
func (*Processor) IsPaused ¶ added in v0.0.14
IsPaused returns whether the processor is currently paused
func (*Processor) PauseProcessing ¶ added in v0.0.14
func (p *Processor) PauseProcessing()
PauseProcessing pauses the processor, preventing new jobs from starting and pausing active jobs
func (*Processor) ResumeProcessing ¶ added in v0.0.14
func (p *Processor) ResumeProcessing()
ResumeProcessing resumes the processor, allowing new jobs to start and resuming active jobs
type ProcessorOptions ¶
type ProcessorOptions struct {
Queue *queue.Queue
Config config.Config
QueueConfig config.QueueConfig
PoolManager *pool.Manager
OutputFolder string
DeleteOriginalFile bool
DeleteDelay time.Duration // delay before deleting original files
MaintainOriginalExtension bool
WatchFolder string
FollowSymlinks bool // Control whether to follow symlinks when collecting folder files
CanProcessNextItem func() bool // Callback to check if processor can start new items
OnJobError func(fileName, errorMessage string) // Callback when job fails permanently
}
type RunningJob ¶ added in v0.0.13
type RunningJob struct {
RunningJobDetails
Progress progress.JobProgress
// contains filtered or unexported fields
}
type RunningJobDetails ¶
type RunningJobItem ¶
type RunningJobItem struct {
ID string `json:"id"`
}
RunningJobItem represents a running job for the frontend (kept for backward compatibility)
type ScriptRetryWorker ¶ added in v0.0.29
type ScriptRetryWorker struct {
// contains filtered or unexported fields
}
ScriptRetryWorker handles retrying failed post-upload script executions
func NewScriptRetryWorker ¶ added in v0.0.29
func NewScriptRetryWorker(ctx context.Context, queue *queue.Queue, scriptConfig config.PostUploadScriptConfig) *ScriptRetryWorker
NewScriptRetryWorker creates a new script retry worker
func (*ScriptRetryWorker) Start ¶ added in v0.0.29
func (w *ScriptRetryWorker) Start()
Start begins the retry worker loop
func (*ScriptRetryWorker) Stop ¶ added in v0.0.29
func (w *ScriptRetryWorker) Stop()
Stop stops the retry worker