cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kelv...@apache.org
Subject [13/13] git commit: updated refs/heads/master to 1e2e1ea
Date Thu, 09 Jan 2014 22:34:01 GMT
CLOUDSTACK-5752: Use pesudo job context when API dispather directly calls into orchestration
flow


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

Branch: refs/heads/master
Commit: a05d71a80c16628d8cb15c419c3a794df16ec6ff
Parents: 0965adb
Author: Kelven Yang <kelveny@gmail.com>
Authored: Fri Jan 3 18:05:31 2014 -0800
Committer: Kelven Yang <kelveny@gmail.com>
Committed: Thu Jan 9 14:29:13 2014 -0800

----------------------------------------------------------------------
 .../cloudstack/framework/jobs/AsyncJobExecutionContext.java      | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a05d71a8/framework/jobs/src/org/apache/cloudstack/framework/jobs/AsyncJobExecutionContext.java
----------------------------------------------------------------------
diff --git a/framework/jobs/src/org/apache/cloudstack/framework/jobs/AsyncJobExecutionContext.java
b/framework/jobs/src/org/apache/cloudstack/framework/jobs/AsyncJobExecutionContext.java
index 05b7bf8..f558e01 100644
--- a/framework/jobs/src/org/apache/cloudstack/framework/jobs/AsyncJobExecutionContext.java
+++ b/framework/jobs/src/org/apache/cloudstack/framework/jobs/AsyncJobExecutionContext.java
@@ -150,6 +150,10 @@ public class AsyncJobExecutionContext {
 
     public static AsyncJobExecutionContext getCurrentExecutionContext() {
         AsyncJobExecutionContext context = s_currentExectionContext.get();
+        if (context == null) {
+            context = registerPseudoExecutionContext(CallContext.current().getCallingAccountId(),
+                    CallContext.current().getCallingUserId());
+        }
         return context;
     }
 


Mime
View raw message