Support bot site

This commit is contained in:
Lunny Xiao
2022-11-25 17:48:47 +08:00
committed by Jason Song
parent 7059cd7265
commit 9a45572ce2
6 changed files with 24 additions and 20 deletions
+2 -2
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
}