feat: retry all failed task (close #5242)

pull/5554/head
Andy Hsu 2023-11-21 15:54:42 +08:00
parent 7583c4d734
commit b2890f05ab
1 changed files with 4 additions and 0 deletions

View File

@ -71,6 +71,10 @@ func taskRoute[T tache.TaskWithInfo](g *gin.RouterGroup, manager *tache.Manager[
manager.RemoveByState(tache.StateSucceeded)
common.SuccessResp(c)
})
g.POST("/retry_failed", func(c *gin.Context) {
manager.RetryAllFailed()
common.SuccessResp(c)
})
}
func SetupTaskRoute(g *gin.RouterGroup) {