added conditions for printing schedule logs
This commit is contained in:
parent
93cc222ab9
commit
a6f7388c61
@ -298,10 +298,12 @@ public class ActorSystemContext {
|
|||||||
@Scheduled(fixedDelayString = "${js.remote.stats.print_interval_ms}")
|
@Scheduled(fixedDelayString = "${js.remote.stats.print_interval_ms}")
|
||||||
public void printStats() {
|
public void printStats() {
|
||||||
if (statisticsEnabled) {
|
if (statisticsEnabled) {
|
||||||
|
if (jsInvokeRequestsCount.get() > 0 || jsInvokeResponsesCount.get() > 0 || jsInvokeFailuresCount.get() > 0) {
|
||||||
log.info("Rule Engine JS Invoke Stats: requests [{}] responses [{}] failures [{}]",
|
log.info("Rule Engine JS Invoke Stats: requests [{}] responses [{}] failures [{}]",
|
||||||
jsInvokeRequestsCount.getAndSet(0), jsInvokeResponsesCount.getAndSet(0), jsInvokeFailuresCount.getAndSet(0));
|
jsInvokeRequestsCount.getAndSet(0), jsInvokeResponsesCount.getAndSet(0), jsInvokeFailuresCount.getAndSet(0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Value("${actors.tenant.create_components_on_init}")
|
@Value("${actors.tenant.create_components_on_init}")
|
||||||
@Getter
|
@Getter
|
||||||
|
|||||||
@ -92,8 +92,10 @@ public class TbSqlBlockingQueue<E> implements TbSqlQueue<E> {
|
|||||||
});
|
});
|
||||||
|
|
||||||
logExecutor.scheduleAtFixedRate(() -> {
|
logExecutor.scheduleAtFixedRate(() -> {
|
||||||
|
if (queue.size() > 0 || addedCount.get() > 0 || savedCount.get() > 0 || failedCount.get() > 0) {
|
||||||
log.info("[{}] queueSize [{}] totalAdded [{}] totalSaved [{}] totalFailed [{}]",
|
log.info("[{}] queueSize [{}] totalAdded [{}] totalSaved [{}] totalFailed [{}]",
|
||||||
params.getLogName(), queue.size(), addedCount.getAndSet(0), savedCount.getAndSet(0), failedCount.getAndSet(0));
|
params.getLogName(), queue.size(), addedCount.getAndSet(0), savedCount.getAndSet(0), failedCount.getAndSet(0));
|
||||||
|
}
|
||||||
}, params.getStatsPrintIntervalMs(), params.getStatsPrintIntervalMs(), TimeUnit.MILLISECONDS);
|
}, params.getStatsPrintIntervalMs(), params.getStatsPrintIntervalMs(), TimeUnit.MILLISECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user