Skip to content

Commit

Permalink
fix(jans-link): polling interval and time difference calculation #5667 (
Browse files Browse the repository at this point in the history
#5668)

Signed-off-by: Mustafa Baser <mbaser@mail.com>
  • Loading branch information
shekhar16 authored and devrimyatar committed Dec 30, 2023
1 parent 49d1219 commit 08ad908
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ private boolean isStartCacheRefresh(AppConfiguration currentConfiguration) {
return false;
}

long poolingInterval = StringHelper.toInteger(currentConfiguration.getPollingInterval()) * 60 * 1000;
long poolingInterval = StringHelper.toInteger(currentConfiguration.getPollingInterval());
if (poolingInterval < 0) {
return false;
}
Expand Down Expand Up @@ -263,6 +263,7 @@ private boolean isStartCacheRefresh(AppConfiguration currentConfiguration) {
}

long timeDiffrence = System.currentTimeMillis() - this.lastFinishedTime;
timeDiffrence = timeDiffrence/1000;

return timeDiffrence >= poolingInterval;
}
Expand Down

0 comments on commit 08ad908

Please sign in to comment.