feat: update models

This commit is contained in:
Rogee
2025-05-23 20:49:10 +08:00
parent 57cb0a750b
commit 18808200c2
14 changed files with 69 additions and 73 deletions

View File

@@ -106,7 +106,7 @@ func (w *VideoExtractHeadImageWorker) Work(ctx context.Context, job *Job[VideoEx
return errors.Wrap(err, "failed to upload image to OSS")
}
if w.job.Add(&RemoveFile{FilePath: output}); err != nil {
if err := w.job.Add(&RemoveFile{FilePath: output}); err != nil {
log.Errorf("Error removing original file: %v", err)
}
@@ -116,11 +116,11 @@ func (w *VideoExtractHeadImageWorker) Work(ctx context.Context, job *Job[VideoEx
}
dst := filepath.Join(w.app.StoragePath, media.Path)
if w.job.Add(&RemoveFile{FilePath: dst}); err != nil {
if err := w.job.Add(&RemoveFile{FilePath: dst}); err != nil {
log.Errorf("Error removing original file: %v", err)
}
if w.job.Add(&PublishDraftPosts{MediaHash: media.Hash}); err != nil {
if err := w.job.Add(&PublishDraftPosts{MediaHash: media.Hash}); err != nil {
log.Errorf("Error adding job: %v", err)
return errors.Wrap(err, "failed to add job")
}