Class KubeJobFinish

java.lang.Object
java.lang.Thread
de.dlr.proseo.planner.kubernetes.KubeJobFinish
All Implemented Interfaces:
Runnable

public class KubeJobFinish extends Thread
Monitors the completion of a Kubernetes job. This class runs as a separate thread and waits for a Kubernetes job to finish. It periodically checks for the job's completion status and retrieves the finish info. Once the job is finished, it performs additional actions based on the job's outcome. The thread stops after a maximum number of cycles or when the job is found to be finished. Note: This class requires initialization with the planner, kube job, and job name.
Author:
Ernst Melchinger
  • Constructor Details

    • KubeJobFinish

      public KubeJobFinish(KubeJob kubeJob, ProductionPlanner planner, String jobName)
      Creates a new thread instance to monitor a Kubernetes job until its completion.
      Parameters:
      kubeJob - The planner kube job.
      planner - The production planner instance.
      jobName - The Kubernetes job name.
  • Method Details

    • run

      public void run()
      Starts the thread to monitor the Kubernetes job until it finishes and the finish info is retrieved. This check sleeps for a defined time between cycles and stops after a maximum number of cycles (parameters are defined in the configuration).
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
      See Also: