feat: update
This commit is contained in:
@@ -6,9 +6,8 @@ import (
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"quyun/app/models"
|
||||
"quyun/app/model"
|
||||
"quyun/database/fields"
|
||||
"quyun/database/schemas/public/model"
|
||||
"quyun/pkg/utils"
|
||||
"quyun/providers/ali"
|
||||
"quyun/providers/app"
|
||||
@@ -58,7 +57,7 @@ func (w *VideoExtractHeadImageWorker) Work(ctx context.Context, job *Job[VideoEx
|
||||
log.Infof("[Start] Working on job with strings: %+v", job.Args)
|
||||
defer log.Infof("[End] Finished %s", job.Args.Kind())
|
||||
|
||||
media, err := models.Medias.GetByHash(ctx, job.Args.MediaHash)
|
||||
media, err := model.MediasModel.GetByHash(ctx, job.Args.MediaHash)
|
||||
if err != nil {
|
||||
log.Errorf("Error getting media by ID: %v", err)
|
||||
return JobCancel(err)
|
||||
@@ -111,7 +110,7 @@ func (w *VideoExtractHeadImageWorker) Work(ctx context.Context, job *Job[VideoEx
|
||||
log.Errorf("Error removing original file: %v", err)
|
||||
}
|
||||
|
||||
if err := models.Medias.Create(ctx, imageMedia); err != nil {
|
||||
if err := model.MediasModel.Create(ctx, imageMedia); err != nil {
|
||||
log.Errorf("Error creating media record: %v", err)
|
||||
return errors.Wrap(err, "failed to create media record")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user