Skip to content

Commit

Permalink
Improve code.
Browse files Browse the repository at this point in the history
  • Loading branch information
inthirakumaaran committed Dec 12, 2024
1 parent 95f71d6 commit 70f1c56
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ private void handleTask(String tenantDomain) {
}

// Run the task only from master node in cluster setup.
if (isClusterModeEnabled() && !isHazelcastMasterNode()) {
if (isSingleNodeTaskExecutionEnabled() && !isHazelcastMasterNode()) {
return;
}

Expand Down Expand Up @@ -178,7 +178,7 @@ private void handleTask(String tenantDomain) {
*
* @return true or false based on the deployment config.
*/
private boolean isClusterModeEnabled() {
private boolean isSingleNodeTaskExecutionEnabled() {

String clusterModeEnabledValue = IdentityUtil.getProperty(NotificationConstants.EXECUTE_TASK_IN_SINGLE_NODE);
return StringUtils.isNotBlank(clusterModeEnabledValue) ? Boolean.parseBoolean(clusterModeEnabledValue) : false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ protected void unsetRealmService(RealmService realmService) {
policy = ReferencePolicy.DYNAMIC,
unbind = "unsetClusteringAgent")
protected void setClusteringAgent(ConfigurationContextService configurationContextService) {

NotificationTaskDataHolder.getInstance().setClusteringAgent(
configurationContextService.getServerConfigContext().getAxisConfiguration().getClusteringAgent());
}
Expand Down

0 comments on commit 70f1c56

Please sign in to comment.