Adapt to new inputs env struct + instance of a resource

This commit is contained in:
mr
2025-02-05 08:38:50 +01:00
parent 0de2f9842b
commit e4305bdbd1
7 changed files with 128 additions and 8 deletions

View File

@@ -1,6 +1,7 @@
package daemons
import (
"fmt"
"oc-schedulerd/conf"
"os"
"time"
@@ -18,7 +19,7 @@ type ExecutionManager struct{}
func (em *ExecutionManager) RetrieveNextExecutions() {
logger := oclib.GetLogger()
for {
logger.Debug().Msg("New loop")
fmt.Println("Checking for bookings", len(Bookings.Bookings))
Bookings.Mu.Lock()
if len(Bookings.Bookings) > 0 {
bookings := Bookings.Bookings
@@ -54,6 +55,7 @@ func (em *ExecutionManager) executeBooking(booking *workflow_execution.WorkflowE
LokiURL: conf.GetConfig().LokiUrl,
KubeURL: "localhost",
ExecutionID: booking.UUID,
PeerID: booking.CreatorID,
}
monitor.LaunchLocalMonitor()
}