2023-10-18 17:08:53 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2024-04-09 11:20:08 +02:00
|
|
|
"fmt"
|
2023-10-18 17:08:53 +02:00
|
|
|
|
2024-09-04 17:29:00 +02:00
|
|
|
"oc-schedulerd/conf"
|
2024-08-19 11:42:26 +02:00
|
|
|
"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-09-04 17:29:00 +02:00
|
|
|
oclib.SetConfig(
|
|
|
|
conf.GetConfig().MongoUrl,
|
2024-09-04 17:34:05 +02:00
|
|
|
conf.GetConfig().DBName,
|
2024-09-04 17:29:00 +02:00
|
|
|
conf.GetConfig().NatsUrl,
|
|
|
|
conf.GetConfig().LokiUrl,
|
|
|
|
conf.GetConfig().Logs,
|
|
|
|
)
|
|
|
|
oclib.Init("oc-schedulerd")
|
2024-07-11 18:25:40 +02:00
|
|
|
|
2024-08-19 11:42:26 +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
|
|
|
|
2024-08-19 11:42:26 +02:00
|
|
|
exe_mngr.RetrieveNextExecutions()
|
2023-10-18 17:08:53 +02:00
|
|
|
|
2024-08-19 11:42:26 +02:00
|
|
|
fmt.Print("stop")
|
2023-10-18 17:08:53 +02:00
|
|
|
}
|