oclib update + casual debug

This commit is contained in:
mr
2025-02-18 15:00:17 +01:00
parent 88610c3dba
commit 88b2edee2f
6 changed files with 30 additions and 12 deletions

View File

@@ -9,8 +9,6 @@ import (
)
type LocalMonitor struct {
LokiURL string
KubeURL string
ExecutionID string
PeerID string
Duration int
@@ -18,15 +16,17 @@ type LocalMonitor struct {
}
func (lm *LocalMonitor) LaunchLocalMonitor() {
if lm.LokiURL == "" || lm.KubeURL == "" || lm.ExecutionID == "" {
if lm.ExecutionID == "" {
lm.Logger.Error().Msg("Missing parameter in LocalMonitor")
}
lm.execKube()
}
func (lm *LocalMonitor) execKube() {
args := []string{"-e", lm.ExecutionID, "-p", lm.PeerID, "-u", lm.LokiURL, "-m", conf.GetConfig().MongoUrl,
"-d", conf.GetConfig().DBName}
args := []string{
"-e", lm.ExecutionID, "-p", lm.PeerID, "-u", conf.GetConfig().LokiUrl, "-m", conf.GetConfig().MongoUrl,
"-d", conf.GetConfig().DBName,
}
if conf.GetConfig().Mode == "kubernetes" {
args = append(args, []string{"-M", conf.GetConfig().Mode, "-H", conf.GetConfig().KubeHost, "-P", conf.GetConfig().KubePort,

View File

@@ -2,7 +2,6 @@ package daemons
import (
"fmt"
"oc-schedulerd/conf"
"os"
"time"
@@ -52,8 +51,6 @@ func (em *ExecutionManager) executeExecution(Execution *workflow_execution.Workf
monitor := LocalMonitor{
Logger: logger,
Duration: duration,
LokiURL: conf.GetConfig().LokiUrl,
KubeURL: "localhost",
ExecutionID: Execution.UUID,
PeerID: Execution.CreatorID,
}