Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WorkerProcessMedia ¶
func WorkerProcessMedia(jobs <-chan mediaprocessor.MediaJob, errc chan<- error, completion chan<- bool, progress *progressbar.ProgressBar)
WorkerProcessMedia is a worker in a worker pool. It reads media jobs from the queue, and reports success/failure. This is fine for a one-shot thing where you have a fixed number of jobs, but how should it work with an unknown # jobs (and unknown delay between jobs)? Also doesn't allow us to pass errors back up the caller. func WorkerProcessMedia(jobs <-chan mediaprocessor.MediaJob, errc chan<- error, completion chan<- bool) {
Types ¶
type PixelSlicer ¶
type PixelSlicer struct { S3Client *s3.S3Client FSConfig *mediaprocessor.FSConfig MediaConfig *mediaprocessor.MediaConfig MediaProcessor *mediaprocessor.MediaProcessor }
func (*PixelSlicer) CreateJob ¶
func (p *PixelSlicer) CreateJob(file *pixelio.InputFile) mediaprocessor.MediaJob
CreateJob creates a mediaprocessor.MediaJob for a given input file
func (*PixelSlicer) ProcessFiles ¶
func (p *PixelSlicer) ProcessFiles(conf config.ReadableConfig)
ProcessFiles oversees all file processing tasks. It spawns a worker pool, and then calls filesystem-observing functions to queue jobs for those workers. It then monitors the workers, and shuts down when required.