java.lang.Object
org.jenkinsci.plugins.jqsmonitoring.beingbuilt.RunningJob

@ExportedBean public class RunningJob extends Object
Class representing a job that has been running.
Author:
yboev
  • Constructor Details

    • RunningJob

      public RunningJob(LocalConfig lc, Executor executor, Slave slave)
      Constructor
      Parameters:
      lc - local configuration.
      executor - the executor.
      slave - the slave.
  • Method Details

    • getApi

      public Api getApi()
    • getSlaveUrl

      @Exported public String getSlaveUrl()
      Returns the slave url on which this job runs.
      Returns:
      The url as String.
    • getJobUrl

      @Exported public String getJobUrl()
      Returns the job url.
      Returns:
      the url as String.
    • getColor

      @Exported public String getColor()
      Returns the color.
      Returns:
      the color as string. Format: #******.
    • getName

      @Exported public String getName()
      Returns the name of the job.
      Returns:
      the name as string
    • getSlave

      @Exported public Slave getSlave()
      Returns the slave.
      Returns:
      slave on which this job has been running.
    • getRunningTime

      @Exported public String getRunningTime()
      Returns the time this job as been running. Returns it as a string that is human readable.
      Returns:
      elapsed time in h m s format. where h can be greater than 24.
    • getRemainingTime

      @Exported public String getRemainingTime()
      return the remaining time as string that is human readable.
      Returns:
      the remaining time. it will return N/A if this could not be determined.
    • getJobsRunningTooLong

      public static ArrayList<RunningJob> getJobsRunningTooLong(ArrayList<Slave> slaves)
      Returns a list of jobs being build for too long.
      Parameters:
      slaves - list of all slaves
      Returns:
      the jobs that have been being built for more than a certain period of time. The period of time is determined by TimeFilter_1 in the configuration.