oc-schedulerd/main.go

31 lines
547 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
2024-09-04 17:29:00 +02:00
"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"
2023-10-18 17:08:53 +02:00
)
func main() {
2024-11-07 13:35:16 +01:00
oclib.InitDaemon("oc-schedulerd")
2024-09-04 17:29:00 +02:00
oclib.SetConfig(
conf.GetConfig().MongoUrl,
2024-11-07 13:35:16 +01:00
conf.GetConfig().DBName,
conf.GetConfig().NatsUrl,
conf.GetConfig().LokiUrl,
conf.GetConfig().Logs,
2024-09-04 17:29:00 +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
}