Remove unnecessary logs

scopeMapAPILayer
Charitha Goonetilleke 2 years ago
parent 0009bdd460
commit 204ba91010

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

Loading…
Cancel
Save