Remove unnecessary logs

entgra-logger
Charitha Goonetilleke 2 years ago
parent 0009bdd460
commit 204ba91010

@ -18,6 +18,7 @@
package org.wso2.carbon.device.mgt.core.operation.mgt;
import com.google.gson.Gson;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@ -792,15 +793,16 @@ public class OperationManagerImpl implements OperationManager {
if (dtoOperation != null) {
long currentTime = Calendar.getInstance().getTime().getTime();
log.info("Current timestamp:" + currentTime);
long updatedTime = Timestamp.valueOf(dtoOperation.getReceivedTimeStamp()).getTime();
log.info("Updated timestamp: " + updatedTime);
// check if notnow frequency is met and set next pending operation if not, otherwise let notnow
// operation to proceed
if ((currentTime - updatedTime) < notNowOperationFrequency) {
dtoOperation = operationDAO.getNextOperation(enrolmentInfo.getId(),
org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Status.PENDING);
} else {
log.warn("Updated timestamp (" + updatedTime + ") of operation (" +
new Gson().toJson(dtoOperation) + ") is ahead from current: " + currentTime);
}
} else {
dtoOperation = operationDAO.getNextOperation(enrolmentInfo.getId(),

Loading…
Cancel
Save