feat: update jobs
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
"quyun/providers/app"
|
||||
"quyun/providers/job"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
. "github.com/riverqueue/river"
|
||||
"github.com/samber/lo"
|
||||
log "github.com/sirupsen/logrus"
|
||||
@@ -99,7 +100,7 @@ func (w *PublishDraftPostsWorker) Work(ctx context.Context, job *Job[PublishDraf
|
||||
}
|
||||
if err := models.Posts.Create(ctx, post); err != nil {
|
||||
log.Errorf("Error creating post: %v", err)
|
||||
return JobCancel(err)
|
||||
return errors.Wrap(err, "create post")
|
||||
}
|
||||
log.Infof("Post created successfully with ID: %d", post.ID)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user