small tweaks
This commit is contained in:
parent
bdbbd7697a
commit
7c913bec0e
@ -179,6 +179,7 @@ func LogKubernetesArgo(wfName string, namespace string, watcher watch.Interface)
|
|||||||
if node.Phase.Completed() {
|
if node.Phase.Completed() {
|
||||||
wfl.Info().Msg(wfName + " worflow completed")
|
wfl.Info().Msg(wfName + " worflow completed")
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
wfl.Info().Msg(wfName + " exiting")
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
if node.Phase.FailedOrError() {
|
if node.Phase.FailedOrError() {
|
||||||
@ -205,6 +206,7 @@ func retrieveCondition(wf *wfv1.Workflow) (c Conditions) {
|
|||||||
|
|
||||||
// Function needed to be executed as a go thread
|
// Function needed to be executed as a go thread
|
||||||
func logKubernetesPods(executionId string, wfName string,podName string, logger zerolog.Logger, wg *sync.WaitGroup){
|
func logKubernetesPods(executionId string, wfName string,podName string, logger zerolog.Logger, wg *sync.WaitGroup){
|
||||||
|
defer wg.Done()
|
||||||
|
|
||||||
s := strings.Split(podName, ".")
|
s := strings.Split(podName, ".")
|
||||||
name := s[0] + "-" + s[1]
|
name := s[0] + "-" + s[1]
|
||||||
|
4
main.go
4
main.go
@ -126,7 +126,7 @@ func executeInside(execID string, ns string, argo_file_path string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
name, err := t.CreateArgoWorkflow(argo_file_path, ns)
|
name, err := t.CreateArgoWorkflow(argo_file_path, ns)
|
||||||
_ = name
|
// _ = name
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Error().Msg("Could not create argo workflow : " + err.Error())
|
logger.Error().Msg("Could not create argo workflow : " + err.Error())
|
||||||
logger.Info().Msg(fmt.Sprint("CA :" + conf.GetConfig().KubeCA))
|
logger.Info().Msg(fmt.Sprint("CA :" + conf.GetConfig().KubeCA))
|
||||||
@ -143,6 +143,8 @@ func executeInside(execID string, ns string, argo_file_path string) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Error().Msg("Could not log workflow : " + err.Error())
|
logger.Error().Msg("Could not log workflow : " + err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.Info().Msg("Finished, exiting...")
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user