feat: update jobs

This commit is contained in:
yanghao05
2025-04-22 20:01:50 +08:00
parent 163a7c11fe
commit 707cbbb639
21 changed files with 359 additions and 87 deletions

View File

@@ -62,10 +62,6 @@ func (w *DownloadFromAliOSSWorker) Work(ctx context.Context, job *Job[DownloadFr
}
dst := filepath.Join(w.app.StoragePath, media.Path)
if w.job.Add(&RemoveDownloadedVideo{FilePath: dst}); err != nil {
log.Errorf("Error removing original file: %v", err)
}
// check is path exist
st, err := os.Stat(dst)
if os.IsNotExist(err) {
@@ -104,10 +100,5 @@ func (w *DownloadFromAliOSSWorker) NextJob(hash string) error {
return err
}
if err := w.job.Add(&VideoExtractHeadImage{MediaHash: hash}); err != nil {
log.Errorf("Error adding job: %v", err)
return err
}
return nil
}