Skip to content

Commit b613d05

Browse files
author
john McGehee
committed
Change the "Status check frequency" to float
so that fractional minutes can be specified.
1 parent a6a08fb commit b613d05

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/org/jenkinsci/plugins/lsf/BatchBuilder.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public class BatchBuilder extends Builder {
7676
// the files that need to be sent before executing the job
7777
private String filesToSend = "";
7878
// how often the status of the job should be checked
79-
private int checkFrequencyMinutes = 1;
79+
private float checkFrequencyMinutes = 1;
8080
// names of the files that have been uploaded (separated by commas)
8181
private String uploadedFiles = getUploadedFiles();
8282
// configuration for checking if email should be sent
@@ -99,7 +99,7 @@ public class BatchBuilder extends Builder {
9999
@DataBoundConstructor
100100
public BatchBuilder(String job, String filesToDownload,
101101
String downloadDestination, String filesToSend,
102-
int checkFrequencyMinutes, boolean sendEmail) {
102+
float checkFrequencyMinutes, boolean sendEmail) {
103103
this.job = job;
104104
this.filesToDownload = filesToDownload;
105105
this.downloadDestination = downloadDestination;
@@ -117,7 +117,7 @@ public String getFilesToDownload() {
117117
return filesToDownload;
118118
}
119119

120-
public int getCheckFrequencyMinutes() {
120+
public float getCheckFrequencyMinutes() {
121121
return checkFrequencyMinutes;
122122
}
123123

@@ -186,7 +186,7 @@ public boolean perform(AbstractBuild<?, ?> build,
186186
// loops for checking the job's status and progress until
187187
// it reaches an ending state
188188
while (!batchSystem.isEndStatus(jobStatus)) {
189-
Thread.sleep(checkFrequencyMinutes * 60000);
189+
Thread.sleep((long) (checkFrequencyMinutes * 60000));
190190
jobStatus = batchSystem.getJobStatus(jobId);
191191
listener.getLogger().println("JOB STATUS: " + jobStatus);
192192
batchSystem.processStatus(jobStatus);

0 commit comments

Comments
 (0)