first
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package control_case
|
||||
|
||||
import (
|
||||
"github.com/che4web/go4rest"
|
||||
"github.com/gin-gonic/gin"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
func RegisterApp(r *gin.Engine, db *gorm.DB) {
|
||||
db.AutoMigrate(&ControlCase{})
|
||||
db.AutoMigrate(&Params{})
|
||||
|
||||
controller := NewControlCaseController(db)
|
||||
params := NewParamsController(db)
|
||||
go4rest.RegisterCRUDRoutes(r, "control_case", controller)
|
||||
go4rest.RegisterCRUDRoutes(r, "params", params)
|
||||
numJobs := 1
|
||||
//jobs := make(chan Params, numJobs)
|
||||
results := make(chan int, numJobs)
|
||||
go RunControllWorker(db, results)
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user