Skip to content

Commit

Permalink
fix checkstyle violation
Browse files Browse the repository at this point in the history
  • Loading branch information
sajid riaz committed Dec 7, 2023
1 parent 6bb738d commit 6188801
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public abstract class RepairTask implements NotificationListener
{
private static final Logger LOG = LoggerFactory.getLogger(RepairTask.class);
private static final Pattern RANGE_PATTERN = Pattern.compile("\\((-?[0-9]+),(-?[0-9]+)\\]");
private static final int HEALTH_CHECK_INTERVAL = 10;
private final ScheduledExecutorService myExecutor = Executors.newSingleThreadScheduledExecutor(
new ThreadFactoryBuilder().setNameFormat("HangPreventingTask-%d").build());
private final CountDownLatch myLatch = new CountDownLatch(1);
Expand Down Expand Up @@ -259,7 +260,7 @@ private void rescheduleHangPrevention()
myHangPreventFuture.cancel(false);
}
// Schedule the first check to happen after 10 minutes
myHangPreventFuture = myExecutor.schedule(new HangPreventingTask(), 10,
myHangPreventFuture = myExecutor.schedule(new HangPreventingTask(), HEALTH_CHECK_INTERVAL,
TimeUnit.MINUTES);
}

Expand Down Expand Up @@ -386,7 +387,7 @@ public void run()
else
{
checkCount++;
myHangPreventFuture = myExecutor.schedule(this, 10, TimeUnit.MINUTES);
myHangPreventFuture = myExecutor.schedule(this, HEALTH_CHECK_INTERVAL, TimeUnit.MINUTES);
}
}
else
Expand Down

0 comments on commit 6188801

Please sign in to comment.