oc-schedulerd/main.go

27 lines
492 B
Go
Raw Normal View History

2023-10-18 17:08:53 +02:00
package main
import (
"fmt"
2023-10-18 17:08:53 +02:00
conf "oc-schedulerd/conf"
"oc-schedulerd/daemons"
2024-08-28 14:03:48 +02:00
2024-08-09 18:44:33 +02:00
oclib "cloud.o-forge.io/core/oc-lib"
2024-08-28 14:03:48 +02:00
"cloud.o-forge.io/core/oc-lib/tools"
2023-10-18 17:08:53 +02:00
)
func main() {
2024-08-21 14:20:13 +02:00
tools.SetConfig(conf.GetConfig().MongoUrl, "DC_myDC", "")
2024-08-28 14:03:48 +02:00
oclib.Init("oc-schedulerd","","")
2024-07-11 18:25:40 +02:00
sch_mngr := daemons.ScheduleManager{Logger: oclib.GetLogger()}
2024-07-29 15:45:32 +02:00
exe_mngr := daemons.ExecutionManager{}
2024-08-21 14:20:13 +02:00
go sch_mngr.ListenNATS()
2024-07-29 15:45:32 +02:00
go sch_mngr.SchedulePolling()
2024-07-11 18:25:40 +02:00
exe_mngr.RetrieveNextExecutions()
2023-10-18 17:08:53 +02:00
fmt.Print("stop")
2023-10-18 17:08:53 +02:00
}