Respect logWarningForTaskAfterMillis for logging a retrieval warning (#383)
Only log a warning if it's been > logWarningForTaskAfterMillis time since data was last received.
This commit is contained in:
parent
e3eff0dc3c
commit
99667e8f50
1 changed files with 3 additions and 1 deletions
|
|
@ -299,8 +299,10 @@ public class ShardConsumer {
|
||||||
if (lastDataArrival != null) {
|
if (lastDataArrival != null) {
|
||||||
Instant now = Instant.now();
|
Instant now = Instant.now();
|
||||||
Duration timeSince = Duration.between(subscriber.lastDataArrival, now);
|
Duration timeSince = Duration.between(subscriber.lastDataArrival, now);
|
||||||
|
if (timeSince.toMillis() > value) {
|
||||||
log.warn("Last time data arrived: {} ({})", lastDataArrival, timeSince);
|
log.warn("Last time data arrived: {} ({})", lastDataArrival, timeSince);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue