Skip to content

Commit 13c127f

Browse files
committed
added logging
1 parent a92e7d4 commit 13c127f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

usage/src/main/java/com/cloud/usage/UsageManagerImpl.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2274,9 +2274,12 @@ protected void runInContext() {
22742274

22752275
if ((timeSinceLastSuccessJob > 0) && (timeSinceLastSuccessJob > (aggregationDurationMillis - 100))) {
22762276
if (timeToJob > (aggregationDurationMillis / 2)) {
2277-
logger.debug("it's been {} ms since last usage job and {} ms until next job, scheduling an immediate job to catch up (aggregation duration is {} minutes)"
2278-
, timeSinceLastSuccessJob, timeToJob, _aggregationDuration);
2279-
if (!isParsingJobRunning.get()) {
2277+
logger.debug("Hearbeat: it's been {} ms since last finished usage job and {} ms until next job (aggregation duration is {} minutes)",
2278+
timeSinceLastSuccessJob, timeToJob, _aggregationDuration);
2279+
if (isParsingJobRunning.get()) {
2280+
logger.debug("Heartbeat: A parsing job is already running");
2281+
} else {
2282+
logger.debug("Heartbeat: Scheduling an immediate job to catch up");
22802283
scheduleParse();
22812284
}
22822285
}

0 commit comments

Comments
 (0)