cschneider commented on a change in pull request #45:
URL:
https://github.com/apache/sling-org-apache-sling-distribution-journal/pull/45#discussion_r447583515
##########
File path:
src/main/java/org/apache/sling/distribution/journal/impl/subscriber/DistributionSubscriber.java
##########
@@ -371,4 +369,22 @@ private static void delay(long delayInMs) {
}
}
+ private Decision waitPrecondition(long offset) {
+ Decision decision = Precondition.Decision.WAIT;
+ long endTime = System.currentTimeMillis() + PRECONDITION_TIMEOUT *
1000;
+ while (decision == Decision.WAIT && System.currentTimeMillis() <
endTime) {
+ decision = precondition.canProcess(subAgentName, offset);
+ if (decision == Decision.WAIT) {
+ try {
+ Thread.sleep(100);
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ return Decision.SKIP;
Review comment:
I agree
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]