oc-schedulerd/main.go
2024-08-28 14:03:48 +02:00

27 lines
492 B
Go

package main
import (
"fmt"
conf "oc-schedulerd/conf"
"oc-schedulerd/daemons"
oclib "cloud.o-forge.io/core/oc-lib"
"cloud.o-forge.io/core/oc-lib/tools"
)
func main() {
tools.SetConfig(conf.GetConfig().MongoUrl, "DC_myDC", "")
oclib.Init("oc-schedulerd","","")
sch_mngr := daemons.ScheduleManager{Logger: oclib.GetLogger()}
exe_mngr := daemons.ExecutionManager{}
go sch_mngr.ListenNATS()
go sch_mngr.SchedulePolling()
exe_mngr.RetrieveNextExecutions()
fmt.Print("stop")
}