Support bot site

This commit is contained in:
Lunny Xiao
2022-11-16 19:20:52 +08:00
committed by Jason Song
parent 7059cd7265
commit 9a45572ce2
6 changed files with 24 additions and 20 deletions

View File

@@ -210,10 +210,10 @@ func Rerun(ctx *context_module.Context) {
job.Started = 0
job.Stopped = 0
if err := db.WithTx(func(ctx context.Context) error {
if err := db.WithTx(ctx, func(ctx context.Context) error {
_, err := bots_model.UpdateRunJob(ctx, job, builder.Eq{"status": status}, "task_id", "status", "started", "stopped")
return err
}, ctx); err != nil {
}); err != nil {
ctx.Error(http.StatusInternalServerError, err.Error())
return
}