Skip to content

Commit

Permalink
Fix refreshLicenseScheduler documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
SailReal committed Nov 30, 2023
1 parent 97a20b1 commit 913d636
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ public void set(String token) throws JWTVerificationException {
}

/**
* Attempts to refresh the Hub licence every day at 01:00:00 UTC if claim refreshURL is present.
* Attempts to refresh the Hub licence every day between 01:00:00 and 02:00:00 AM UTC if claim refreshURL is present.
*/
@Scheduled(cron = "0 0 1 * * ?", timeZone = "UTC", concurrentExecution = Scheduled.ConcurrentExecution.SKIP)
void refreshLicenseScheduler() throws InterruptedException {
if (license != null) {
randomMinuteSleeper.sleep();
randomMinuteSleeper.sleep(); // add random sleep between [0,59]min to reduce infrastructure load
var refreshUrl = licenseValidator.refreshUrl(license.getToken());
if (refreshUrl.isPresent()) {
var client = HttpClient.newBuilder().followRedirects(HttpClient.Redirect.NORMAL).build();
Expand Down

0 comments on commit 913d636

Please sign in to comment.