Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
Worker does the actual job of checking the balance, scheduling tasks, downloading audio files, transcribing them, etc.
func NewGCPWorker ¶
func NewGCPWorker(u upload.FileUploader, t transcribe.Transcriber, m money.Broker, p pick.Picker, i indexer.Indexer, soxPath string, h health.Checker) *Worker
NewGCPWorker creates a new worker that does its work using Google Cloud Platform.
func (*Worker) MaybeSchedule ¶
MaybeSchedule checks the current balance and schedule new audio tracks to be transcribed. Simple greedy algorithm, should use dynamic programming if I want to optimize for the number of courses converted vs pure length. Returns whether new tasks were scheduled.
Click to show internal directories.
Click to hide internal directories.