Skip to content

Commit 0d65ae0

Browse files
Daan Hooglanddhslove
authored andcommitted
Merge branch '4.19' into 4.20
1 parent e8a04e2 commit 0d65ae0

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

engine/schema/src/main/java/com/cloud/usage/dao/UsageJobDaoImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,10 @@ public void removeLastOpenJobsOwned(String hostname, int pid) {
216216
try {
217217
List<UsageJobVO> jobs = getLastOpenJobsOwned(hostname, pid);
218218
if (CollectionUtils.isNotEmpty(jobs)) {
219-
s_logger.info(String.format("Found %s opens job, to remove", jobs.size()));
219+
logger.info("Found {} opens job, to remove", jobs.size());
220220
for (UsageJobVO job : jobs) {
221-
s_logger.debug(String.format("Removing job - id: %d, pid: %d, job type: %d, scheduled: %d, heartbeat: %s",
222-
job.getId(), job.getPid(), job.getJobType(), job.getScheduled(), job.getHeartbeat()));
221+
logger.debug("Removing job - id: {}, pid: {}, job type: {}, scheduled: {}, heartbeat: {}",
222+
job.getId(), job.getPid(), job.getJobType(), job.getScheduled(), job.getHeartbeat());
223223
remove(job.getId());
224224
}
225225
}

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2160,10 +2160,8 @@ protected void runInContext() {
21602160

21612161
if ((timeSinceLastSuccessJob > 0) && (timeSinceLastSuccessJob > (aggregationDurationMillis - 100))) {
21622162
if (timeToJob > (aggregationDurationMillis / 2)) {
2163-
if (logger.isDebugEnabled()) {
2164-
logger.debug("it's been " + timeSinceLastSuccessJob + " ms since last usage job and " + timeToJob +
2165-
" ms until next job, scheduling an immediate job to catch up (aggregation duration is " + _aggregationDuration + " minutes)");
2166-
}
2163+
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)"
2164+
, timeSinceLastSuccessJob, timeToJob, _aggregationDuration);
21672165
scheduleParse();
21682166
}
21692167
}

0 commit comments

Comments
 (0)