Fix saving note images and transcoding
This commit is contained in:
parent
ba03bf9d4f
commit
fdab54a775
3 changed files with 11 additions and 8 deletions
|
|
@ -7,7 +7,7 @@ import (
|
|||
"github.com/Gleipnir-Technology/bob"
|
||||
"github.com/Gleipnir-Technology/nidus-sync/db"
|
||||
"github.com/Gleipnir-Technology/nidus-sync/db/models"
|
||||
"github.com/Gleipnir-Technology/nidus-sync/platform/background"
|
||||
//"github.com/Gleipnir-Technology/nidus-sync/platform/background"
|
||||
"github.com/Gleipnir-Technology/nidus-sync/platform/subprocess"
|
||||
//"github.com/google/uuid"
|
||||
//"github.com/rs/zerolog/log"
|
||||
|
|
@ -33,6 +33,6 @@ func processAudioFile(ctx context.Context, txn bob.Executor, audio_id int32) err
|
|||
return fmt.Errorf("failed to transcode audio %s to OGG: %v", a.UUID, err)
|
||||
}
|
||||
|
||||
background.NewLabelStudioAudioCreate(ctx, db.PGInstance.BobDB, audio_id)
|
||||
//background.NewLabelStudioAudioCreate(ctx, db.PGInstance.BobDB, audio_id)
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,6 +106,8 @@ func addWaitingJobs(ctx context.Context) error {
|
|||
}
|
||||
func handleJob(ctx context.Context, txn bob.Executor, job *models.Job) error {
|
||||
switch job.Type {
|
||||
case enums.JobtypeAudioTranscode:
|
||||
return processAudioFile(ctx, txn, job.RowID)
|
||||
case enums.JobtypeCSVCommit:
|
||||
return csv.JobCommit(ctx, txn, job.RowID)
|
||||
case enums.JobtypeCSVImport:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue