Skip to content

Commit

Permalink
Merge pull request #495 from amaximus/bugfix/JENKINS-71645
Browse files Browse the repository at this point in the history
[JENKINS-71645] Fix unit for project list fetch interval
  • Loading branch information
rsandell authored Jul 18, 2023
2 parents 3e056ee + 835faa7 commit c8d57b5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public int getTimerUpdatePeriod() {
*/
public void setTimerUpdatePeriod(int timerUpdatePeriod) {
this.timerUpdatePeriod = timerUpdatePeriod;
scheduleProjectListUpdate(0, timerUpdatePeriod);
scheduleProjectListUpdate(0, (int)TimeUnit.MINUTES.toSeconds(timerUpdatePeriod));
}

/**
Expand Down Expand Up @@ -220,7 +220,7 @@ public void scheduleProjectListUpdate(int initDelay, int updatePeriod) {
public void run() {
tryLoadProjectList();
}
}, TimeUnit.SECONDS.toMillis(initDelay), TimeUnit.MINUTES.toMillis(updatePeriod));
}, TimeUnit.SECONDS.toMillis(initDelay), TimeUnit.SECONDS.toMillis(updatePeriod));
} else {
logger.error("Unable to schedule project list update task because timer is null");
}
Expand Down

0 comments on commit c8d57b5

Please sign in to comment.