feat: update job cancel logic
This commit is contained in:
@@ -103,7 +103,7 @@ func (w *VideoStoreShortWorker) Work(ctx context.Context, job *Job[VideoStoreSho
|
|||||||
// upload to oss
|
// upload to oss
|
||||||
if err := w.oss.Upload(ctx, job.Args.FilePath, filePath, ali.WithInternal(true)); err != nil {
|
if err := w.oss.Upload(ctx, job.Args.FilePath, filePath, ali.WithInternal(true)); err != nil {
|
||||||
log.Errorf("Error uploading file to OSS: %v", err)
|
log.Errorf("Error uploading file to OSS: %v", err)
|
||||||
return JobCancel(err)
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := models.Medias.Create(ctx, mediaModel); err != nil {
|
if err := models.Medias.Create(ctx, mediaModel); err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user