rafaelweingartner commented on a change in pull request #3036: Implemented
capabilities for snapshots and vm snapshots.
URL: https://github.com/apache/cloudstack/pull/3036#discussion_r236484442
##########
File path:
server/src/main/java/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java
##########
@@ -1045,16 +1037,13 @@ protected VMSnapshot retrieve() {
long vmId;
public VmJobVirtualMachineOutcome(final AsyncJob job, final long vmId)
{
- super(VirtualMachine.class, job, VmJobCheckInterval.value(), new
Predicate() {
- @Override
- public boolean checkCondition() {
- AsyncJobVO jobVo = _entityMgr.findById(AsyncJobVO.class,
job.getId());
- assert (jobVo != null);
- if (jobVo == null || jobVo.getStatus() !=
JobInfo.Status.IN_PROGRESS)
- return true;
+ super(VirtualMachine.class, job,
VirtualMachineManager.VmJobCheckInterval.value(), () -> {
+ AsyncJobVO jobVo = _entityMgr.findById(AsyncJobVO.class,
job.getId());
+ assert (jobVo != null);
Review comment:
Can you remove this `assert`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services