Skip to content

Commit

Permalink
Added some random delays to avoid cloudfront rate limiting
Browse files Browse the repository at this point in the history
  • Loading branch information
seime committed Nov 26, 2024
1 parent 7396a39 commit d56a02a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public synchronized void doPoll(boolean triggerDeviceUpdate) {
.filter(e -> e.isEnabled()
&& (e.getStatus() == ThingStatus.ONLINE || e.getStatus() == ThingStatus.OFFLINE))
.forEach(e -> {
long delay = delayIncrementer.addAndGet(random.nextLong(3000));
long delay = delayIncrementer.addAndGet(random.nextLong(3000l));
try {
scheduler.schedule(() -> ((PanasonicComfortCloudBaseThingHandler) e.getHandler())
.loadFromServer(), delay, TimeUnit.MILLISECONDS);
Expand Down

0 comments on commit d56a02a

Please sign in to comment.