updated the value of ExecutionID in LocalMonitor constructor
This commit is contained in:
@@ -35,28 +35,30 @@ func (em *ExecutionManager) RetrieveNextExecutions() {
|
||||
}
|
||||
}
|
||||
|
||||
func (em *ExecutionManager) executeExecution(Execution *workflow_execution.WorkflowExecution) {
|
||||
func (em *ExecutionManager) executeExecution(execution *workflow_execution.WorkflowExecution) {
|
||||
// start execution
|
||||
// create the yaml that describes the pod : filename, path/url to Loki
|
||||
var executor Executor
|
||||
// exec_method := os.Getenv("MONITOR_METHOD")
|
||||
logger := oclib.GetLogger()
|
||||
|
||||
duration := 0
|
||||
if Execution.EndDate != nil {
|
||||
duration = int(Execution.EndDate.Sub(Execution.ExecDate).Seconds())
|
||||
if execution.EndDate != nil {
|
||||
duration = int(execution.EndDate.Sub(execution.ExecDate).Seconds())
|
||||
}
|
||||
|
||||
if conf.GetConfig().Mode == "local" {
|
||||
executor = NewLocalMonitor(Execution.ExecutionsID, Execution.CreatorID, duration)
|
||||
executor = NewLocalMonitor(execution.UUID, execution.CreatorID, duration)
|
||||
}
|
||||
|
||||
if conf.GetConfig().Mode == "container" {
|
||||
executor = NewContainerMonitor(Execution.ExecutionsID, Execution.CreatorID, duration)
|
||||
executor = NewContainerMonitor(execution.UUID, execution.CreatorID, duration)
|
||||
}
|
||||
|
||||
if executor == nil {
|
||||
logger.Fatal().Msg("Could not create logger")
|
||||
logger.Fatal().Msg("Could not create executor")
|
||||
}
|
||||
|
||||
args := executor.PrepareMonitorExec()
|
||||
executor.LaunchMonitor(args,logger)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user