Skip to content

Commit

Permalink
[HOPS-130] remove containers stopped just after creation from the con…
Browse files Browse the repository at this point in the history
…tainers log table
  • Loading branch information
berthoug committed Nov 16, 2017
1 parent e8dbe6a commit 1a1e14b
Showing 1 changed file with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,14 +295,18 @@ private void computeAndApplyChargeInt(
chargeProjectDailyCost(chargedProjectsDailyCost, projectName,
user, curentDay, charge);
}
} else if (checkpoint == containerLog.getStart() && containerLog.
getExitstatus() == ContainerExitStatus.CONTAINER_RUNNING_STATE) {
//create a checkPoint at start to store multiplicator.
ContainerCheckPoint newCheckpoint = new ContainerCheckPoint(
containerLog.getContainerid(), containerLog.getStart(),
currentMultiplicator);
containersCheckPoints.put(containerLog.getContainerid(), newCheckpoint);
toBePercistedContainerCheckPoint.add(newCheckpoint);
} else if (checkpoint == containerLog.getStart()){
if (containerLog.getExitstatus() == ContainerExitStatus.CONTAINER_RUNNING_STATE) {
//create a checkPoint at start to store multiplicator.
ContainerCheckPoint newCheckpoint = new ContainerCheckPoint(
containerLog.getContainerid(), containerLog.getStart(),
currentMultiplicator);
containersCheckPoints.put(containerLog.getContainerid(), newCheckpoint);
toBePercistedContainerCheckPoint.add(newCheckpoint);
} else {
//the container is not running remove it from db
toBeRemovedContainersLogs.add((ContainerLog) containerLog);
}
}
}
// Delet the finished ContainersLogs
Expand Down

0 comments on commit 1a1e14b

Please sign in to comment.