package main import ( "fmt" conf "oc-scheduler/conf" "oc-scheduler/models" "oc-scheduler/daemons" oclib "cloud.o-forge.io/core/oc-lib" ) // var log zerolog.Logger func main() { var bookings models.ScheduledBooking oclib.SetConfig(conf.GetConfig().MongoUrl,"DC_myDC") oclib.Init("oc-scheduler") app_conf := conf.GetConfig() apiurl := app_conf.OcCatalogUrl sch_mngr := daemons.ScheduleManager{Api_url: apiurl} sch_mngr.SetBookings(&bookings) exe_mngr := daemons.ExecutionManager{} exe_mngr.SetBookings(&bookings) go sch_mngr.ListenForWorkflowSubmissions() go sch_mngr.SchedulePolling() exe_mngr.RetrieveNextExecutions() // method in Schedule manager that checks the first Schedule object for its start date and exe // var g Graph // list, err := g.GetGraphList(apiurl) // if err != nil { // log.Fatal().Msg("Failed to get the workspaces list, check api url and that api server is up : " + apiurl) // } // println("Available workspaces :") // for workspace, _ := range list { // println(workspace) // } // g.LoadFrom(list["test-alpr"]) // g.ExportToArgo("test-alpr") fmt.Print("stop") }