Skip to content

Commit

Permalink
Add error message when watch is throwing an error
Browse files Browse the repository at this point in the history
  • Loading branch information
Bimo Horizon committed Sep 5, 2019
1 parent 34a11ec commit 0100b14
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/app/service/infra/kubernetes/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ func (client *kubernetesClient) WaitForReadyJob(executionName string, waitTime t
for i := 0; i < config.KubeWaitForResourcePollCount(); i += 1 {
watchJob, watchErr := jobs.Watch(listOptions)
if watchErr != nil {
err = watchErr
continue
}

Expand Down Expand Up @@ -245,12 +246,12 @@ func (client *kubernetesClient) WaitForReadyPod(executionName string, waitTime t
for i := 0; i < config.KubeWaitForResourcePollCount(); i += 1 {
watchJob, watchErr := kubernetesPods.Watch(listOptions)
if watchErr != nil {
err = watchErr
continue
}

timeoutChan := time.After(waitTime)
resultChan := watchJob.ResultChan()
defer watchJob.Stop()

var pod *v1.Pod
for {
Expand Down

0 comments on commit 0100b14

Please sign in to comment.