Skip to content

Commit

Permalink
updated wait job
Browse files Browse the repository at this point in the history
  • Loading branch information
munishchouhan committed May 5, 2024
1 parent 626825b commit 47dc0f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ class KubeTransferStrategy implements TransferStrategy {
final name = getName(info)
final job = k8sService.transferJob(name, blobConfig.s5Image, command, blobConfig)
final podList = k8sService.waitJob(job, blobConfig.transferTimeout.toMillis())
if ( !podList || podList.items.size() < 1 ) {
throw new TransferTimeoutException("Blob transfer job timeout")
}
final podName = podList.items[0].metadata.name
final pod = k8sService.getPod(podName)
final terminated = k8sService.waitPod(pod, blobConfig.transferTimeout.toMillis())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -644,8 +644,8 @@ class K8sServiceImpl implements K8sService {
// wait for termination
while (System.currentTimeMillis() - startTime < timeout) {
final name = job.metadata.name
final active = job.status?.getActive()
if (active && active > 0) {
final status = getJobStatus(name)
if (status != JobStatus.Pending) {
return k8sClient.
coreV1Api().
listNamespacedPod(namespace, null, null, null, null, "job-name=$name", null, null, null, null, null, null)
Expand Down

0 comments on commit 47dc0f7

Please sign in to comment.