cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kelv...@apache.org
Subject git commit: updated refs/heads/4.3 to 29aa7c2
Date Sat, 04 Jan 2014 02:07:11 GMT
Updated Branches:
  refs/heads/4.3 22a1b8c3f -> 29aa7c272


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/29aa7c27
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/29aa7c27
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/29aa7c27

Branch: refs/heads/4.3
Commit: 29aa7c272cbf5ae7beb7e201d912979e62cae220
Parents: 22a1b8c
Author: Kelven Yang <kelveny@gmail.com>
Authored: Fri Jan 3 18:05:31 2014 -0800
Committer: Kelven Yang <kelveny@gmail.com>
Committed: Fri Jan 3 18:05:31 2014 -0800

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/29aa7c27/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 2481145..e9bdae2 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