CLOUDSTACK-5752: Use pesudo job context when API dispather directly calls into orchestration flow

This commit is contained in:
Kelven Yang 2014-01-03 18:05:31 -08:00
parent 0965adb003
commit a05d71a80c

View File

@ -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;
}