MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / initTaskManager

Function initTaskManager

cmd/cql-proxy/init.go:114–130  ·  view source on GitHub ↗
(e *gin.Engine, cfg *config.Config, db *gorp.DbMap)

Source from the content-addressed store, hash-verified

112}
113
114func initTaskManager(e *gin.Engine, cfg *config.Config, db *gorp.DbMap) (tm *task.Manager) {
115 tm = task.NewManager(cfg, db)
116
117 tm.Register(model.TaskCreateDB, api.CreateDatabaseTask)
118 tm.Register(model.TaskApplyToken, api.ApplyTokenTask)
119 tm.Register(model.TaskTopUp, api.TopUpTask)
120 tm.Register(model.TaskCreateProject, api.CreateProjectTask)
121
122 tm.Start()
123
124 e.Use(func(c *gin.Context) {
125 c.Set("task", tm)
126 c.Next()
127 })
128
129 return
130}
131
132func initRulesManager(e *gin.Engine) (rm *resolver.RulesManager) {
133 rm = &resolver.RulesManager{}

Callers 1

initServerFunction · 0.85

Calls 5

NewManagerFunction · 0.92
RegisterMethod · 0.80
StartMethod · 0.45
SetMethod · 0.45
NextMethod · 0.45

Tested by

no test coverage detected