|
@@ -13,8 +13,9 @@ import (
|
|
"dcl_dispatch_server/src/package/util"
|
|
"dcl_dispatch_server/src/package/util"
|
|
_ "embed"
|
|
_ "embed"
|
|
"encoding/json"
|
|
"encoding/json"
|
|
- "github.com/gin-gonic/gin"
|
|
|
|
"os"
|
|
"os"
|
|
|
|
+
|
|
|
|
+ "github.com/gin-gonic/gin"
|
|
)
|
|
)
|
|
|
|
|
|
func init() {
|
|
func init() {
|
|
@@ -73,7 +74,7 @@ func init() {
|
|
|
|
|
|
func main() {
|
|
func main() {
|
|
|
|
|
|
- // 启动任务处理进程
|
|
|
|
|
|
+ // ************启动任务处理进程*****************
|
|
go application.RunWaitingUser() // 先判断用户
|
|
go application.RunWaitingUser() // 先判断用户
|
|
go application.RunWaitingCluster() // 再判断集群,集群判断完可以运行
|
|
go application.RunWaitingCluster() // 再判断集群,集群判断完可以运行
|
|
|
|
|
|
@@ -81,11 +82,11 @@ func main() {
|
|
{
|
|
{
|
|
router := gin.Default()
|
|
router := gin.Default()
|
|
router.Use(middleware.Cors()) // 解决cors
|
|
router.Use(middleware.Cors()) // 解决cors
|
|
- {
|
|
|
|
|
|
+ { // 供数据闭环平台调用(曹总)
|
|
api1 := router.Group(infra.ApplicationYaml.Web.RoutePrefix)
|
|
api1 := router.Group(infra.ApplicationYaml.Web.RoutePrefix)
|
|
api1.POST("/start-project", handler.StartProject)
|
|
api1.POST("/start-project", handler.StartProject)
|
|
}
|
|
}
|
|
- {
|
|
|
|
|
|
+ { // 供仿真容器调用(王奕石)
|
|
api2 := router.Group("/simulation/resource/scheduler/task")
|
|
api2 := router.Group("/simulation/resource/scheduler/task")
|
|
api2.GET("/confirm", handler.Confirm)
|
|
api2.GET("/confirm", handler.Confirm)
|
|
api2.GET("/tick", handler.Tick)
|
|
api2.GET("/tick", handler.Tick)
|