tasks

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const TypeHello = "hello"
View Source
const TypeProgramDeleteOriginal = "program:delete_original"
View Source
const TypeProgramEncode = "program:encode"
View Source
const TypeProgramExtractSubtitle = "program:extract_subtitle"
View Source
const TypeProgramTranscriptionApi = "program:transcription:api"
View Source
const TypeProgramTranscriptionLocal = "program:transcription:local"

Variables

This section is empty.

Functions

func HelloTask

func HelloTask(ctx context.Context, t *asynq.Task) error

func NewHelloTask

func NewHelloTask() (*asynq.Task, error)

func NewProgramDeleteOriginalTask

func NewProgramDeleteOriginalTask(programId int64, contentPath string, monitorTaskInfos []*asynq.TaskInfo, queueName string) (*asynq.Task, error)

func NewProgramEncodeTask

func NewProgramEncodeTask(programId int64, contentPath string, outputPath string, queueName string) (*asynq.Task, error)

func NewProgramExtractSubtileTask

func NewProgramExtractSubtileTask(programId int64, contentPath string, outputPath string, queueName string) (*asynq.Task, error)

func NewProgramTranscriptionApiTask

func NewProgramTranscriptionApiTask(programId int64, contentPath string, encodedPath string, outputPath string, queueName string) (*asynq.Task, error)

func NewProgramTranscriptionLocalTask

func NewProgramTranscriptionLocalTask(programId int64, contentPath string, encodedPath string, outputPath string, queueName string) (*asynq.Task, error)

Types

type HelloPayload

type HelloPayload struct {
}

type ProgramDeleteOriginalPayload

type ProgramDeleteOriginalPayload struct {
	ProgramId        int64             `json:"programId"`
	ContentPath      string            `json:"contentPath"`
	MonitorTaskInfos []*asynq.TaskInfo `json:"monitorTaskInfos"`
}

type ProgramDeleter

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

func NewProgramDeleter

func NewProgramDeleter(logger *zap.Logger, inspector *asynq.Inspector, recordedBasePath string) *ProgramDeleter

func (*ProgramDeleter) ProcessTask

func (e *ProgramDeleter) ProcessTask(ctx context.Context, t *asynq.Task) error

type ProgramEncodePayload

type ProgramEncodePayload struct {
	ProgramId   int64  `json:"programId"`
	ContentPath string `json:"contentPath"`
	OutputPath  string `json:"outputPath"`
}

type ProgramEncoder

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

func NewProgramEncoder

func NewProgramEncoder(logger *zap.Logger, encodeCommandTmpl *template.Template, recordedBasePath string, encodedBasePath string, deleteOriginalFile bool) *ProgramEncoder

func (*ProgramEncoder) ProcessTask

func (e *ProgramEncoder) ProcessTask(ctx context.Context, t *asynq.Task) error

type ProgramExtractSubtilePayload

type ProgramExtractSubtilePayload struct {
	ProgramId   int64  `json:"programId"`
	ContentPath string `json:"contentPath"`
	OutputPath  string `json:"outputPath"`
}

type ProgramExtractor

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

func NewProgramExtractor

func NewProgramExtractor(logger *zap.Logger, recordedBasePath string, transcribedBasePath string) *ProgramExtractor

func (*ProgramExtractor) ProcessTask

func (e *ProgramExtractor) ProcessTask(ctx context.Context, t *asynq.Task) error

type ProgramTranscriberApi

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

func NewProgramTranscriberApi

func NewProgramTranscriberApi(logger *zap.Logger, gpt *gpt.GPTClient, encodeCommandTmpl *template.Template, recordedBasePath string, encodedBasePath string, transcribedBasePath string) *ProgramTranscriberApi

func (*ProgramTranscriberApi) ProcessTask

func (e *ProgramTranscriberApi) ProcessTask(ctx context.Context, t *asynq.Task) error

type ProgramTranscriberLocal

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

func NewProgramTranscriberLocal

func NewProgramTranscriberLocal(logger *zap.Logger, encodeCommandTmpl *template.Template, recordedBasePath string, encodedBasePath string, transcribedBasePath string, runWhisperScript string, whisperModel string) *ProgramTranscriberLocal

func (*ProgramTranscriberLocal) ProcessTask

func (e *ProgramTranscriberLocal) ProcessTask(ctx context.Context, t *asynq.Task) error

type ProgramTranscriptionApiPayload

type ProgramTranscriptionApiPayload struct {
	ProgramId   int64  `json:"programId"`
	ContentPath string `json:"contentPath"`
	EncodedPath string `json:"encodedPath"`
	OutputPath  string `json:"outputPath"`
}

type ProgramTranscriptionLocalPayload

type ProgramTranscriptionLocalPayload struct {
	ProgramId   int64  `json:"programId"`
	ContentPath string `json:"contentPath"`
	EncodedPath string `json:"encodedPath"`
	OutputPath  string `json:"outputPath"`
}

Jump to

Keyboard shortcuts

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