mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 11:52:28 +01:00
api: Fix issue observed with message publish on creation of domain (#6118)
* api: Fix issue observed with message publish on creation of domain * add check for successful creation of domain before publishing event
This commit is contained in:
parent
56bf418185
commit
ca9e28dc84
@ -220,11 +220,12 @@ public class DomainManagerImpl extends ManagerBase implements DomainManager, Dom
|
||||
_resourceCountDao.createResourceCounts(domain.getId(), ResourceLimit.ResourceOwnerType.Domain);
|
||||
|
||||
CallContext.current().putContextParameter(Domain.class, domain.getUuid());
|
||||
_messageBus.publish(_name, MESSAGE_ADD_DOMAIN_EVENT, PublishScope.LOCAL, domain.getId());
|
||||
return domain;
|
||||
}
|
||||
});
|
||||
|
||||
if (domain != null) {
|
||||
_messageBus.publish(_name, MESSAGE_ADD_DOMAIN_EVENT, PublishScope.LOCAL, domain.getId());
|
||||
}
|
||||
return domain;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user