CLOUDSTACK-7843: sync Job Failures always reported as success on Event Bus

Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ca66062c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ca66062c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ca66062c

Branch: refs/heads/statscollector-graphite
Commit: ca66062cd54305afaaa64d707a88fc11764e292d
Parents: 131c2f2
Author: Damodar <damoder.re...@citrix.com>
Authored: Wed Nov 5 17:19:46 2014 +0530
Committer: Kishan Kavala <kis...@apache.org>
Committed: Mon Nov 10 14:33:28 2014 +0530

----------------------------------------------------------------------
 .../cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java       | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ca66062c/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java
----------------------------------------------------------------------
diff --git 
a/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java
 
b/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java
index 91516d5..d5f7f9d 100644
--- 
a/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java
+++ 
b/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java
@@ -253,7 +253,6 @@ public class AsyncJobManagerImpl extends ManagerBase 
implements AsyncJobManager,
         if (s_logger.isDebugEnabled()) {
             s_logger.debug("Publish async job-" + jobId + " complete on 
message bus");
         }
-        publishOnEventBus(job, "complete"); // publish before the instance 
type and ID are wiped out
 
         if (s_logger.isDebugEnabled()) {
             s_logger.debug("Wake up jobs related to job-" + jobId);
@@ -291,6 +290,8 @@ public class AsyncJobManagerImpl extends ManagerBase 
implements AsyncJobManager,
             }
         });
 
+        publishOnEventBus(job, "complete"); // publish before the instance 
type and ID are wiped out
+
         //
         // disable wakeup scheduling now, since all API jobs are currently 
using block-waiting for sub-jobs
         //

Reply via email to