koushik-das commented on a change in pull request #1832: CLOUDSTACK-9652 Job 
framework - Cancelling async jobs
URL: https://github.com/apache/cloudstack/pull/1832#discussion_r114259113
 
 

 ##########
 File path: 
engine/orchestration/src/com/cloud/agent/manager/AgentManagerImpl.java
 ##########
 @@ -1635,6 +1677,24 @@ protected void runInContext() {
         }
     }
 
+    protected class CancelTask extends ManagedContextRunnable {
+        @Override
+        protected void runInContext() {
+            final List<AsyncJobVO> jobs = _asyncJobDao.getCancelledJobs();
 
 Review comment:
   When an async. API job is cancelled, for how long the DB record is kept? If 
the records are there in the DB for more than 60 seconds there may be issues. 
Since the CancelTask is scheduled to run every 60 seconds, getCancelledJobs() 
may fetch records already processed in the previous iteration of CancelTask
 
----------------------------------------------------------------
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

Reply via email to