feat: update

This commit is contained in:
yanghao05
2025-04-17 20:59:01 +08:00
parent 7ebbc01ae2
commit 2780d16edc
3 changed files with 8 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ import (
"quyun/app/models"
"quyun/providers/ali"
"quyun/providers/app"
"quyun/providers/job"
. "github.com/riverqueue/river"
@@ -42,6 +43,7 @@ type DownloadFromAliOSSWorker struct {
oss *ali.OSSClient
job *job.Job
app *app.Config
}
func (w *DownloadFromAliOSSWorker) NextRetry(job *Job[DownloadFromAliOSS]) time.Time {
@@ -60,7 +62,7 @@ func (w *DownloadFromAliOSSWorker) Work(ctx context.Context, job *Job[DownloadFr
return JobCancel(err)
}
dst := filepath.Join("/Users/rogee/Projects/self/quyun/backend/fixtures/oss/", media.Path)
dst := filepath.Join(w.app.StoragePath, media.Path)
// check is path exist
st, err := os.Stat(dst)