From b613d0539e013bb2fb70130bb8d97d94fa5f0179 Mon Sep 17 00:00:00 2001 From: john McGehee Date: Wed, 16 Dec 2015 18:41:48 -0800 Subject: [PATCH] Change the "Status check frequency" to float so that fractional minutes can be specified. --- src/main/java/org/jenkinsci/plugins/lsf/BatchBuilder.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/jenkinsci/plugins/lsf/BatchBuilder.java b/src/main/java/org/jenkinsci/plugins/lsf/BatchBuilder.java index 8f9face..7636562 100644 --- a/src/main/java/org/jenkinsci/plugins/lsf/BatchBuilder.java +++ b/src/main/java/org/jenkinsci/plugins/lsf/BatchBuilder.java @@ -76,7 +76,7 @@ public class BatchBuilder extends Builder { // the files that need to be sent before executing the job private String filesToSend = ""; // how often the status of the job should be checked - private int checkFrequencyMinutes = 1; + private float checkFrequencyMinutes = 1; // names of the files that have been uploaded (separated by commas) private String uploadedFiles = getUploadedFiles(); // configuration for checking if email should be sent @@ -99,7 +99,7 @@ public class BatchBuilder extends Builder { @DataBoundConstructor public BatchBuilder(String job, String filesToDownload, String downloadDestination, String filesToSend, - int checkFrequencyMinutes, boolean sendEmail) { + float checkFrequencyMinutes, boolean sendEmail) { this.job = job; this.filesToDownload = filesToDownload; this.downloadDestination = downloadDestination; @@ -117,7 +117,7 @@ public String getFilesToDownload() { return filesToDownload; } - public int getCheckFrequencyMinutes() { + public float getCheckFrequencyMinutes() { return checkFrequencyMinutes; } @@ -186,7 +186,7 @@ public boolean perform(AbstractBuild build, // loops for checking the job's status and progress until // it reaches an ending state while (!batchSystem.isEndStatus(jobStatus)) { - Thread.sleep(checkFrequencyMinutes * 60000); + Thread.sleep((long) (checkFrequencyMinutes * 60000)); jobStatus = batchSystem.getJobStatus(jobId); listener.getLogger().println("JOB STATUS: " + jobStatus); batchSystem.processStatus(jobStatus);