aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-openstack-adapters/src
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2020-06-25 19:14:07 +0000
committerGerrit Code Review <gerrit@onap.org>2020-06-25 19:14:07 +0000
commitd99ac569a32064d4b61475c73c9ff41aa93596a6 (patch)
tree71a2687a55d51f8aa4c6851b1c903bcf28b771c5 /adapters/mso-openstack-adapters/src
parent3deb179f8637019b6034bd0f3a321e68ab85e520 (diff)
parent0a430810ec28976d53edf371382c781515937920 (diff)
Merge "Loop over max clients to fix topic not getting"
Diffstat (limited to 'adapters/mso-openstack-adapters/src')
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/delete/DeleteInventoryService.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/delete/DeleteInventoryService.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/delete/DeleteInventoryService.java
index b104c3310c..4d8c74dbfe 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/delete/DeleteInventoryService.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/delete/DeleteInventoryService.java
@@ -21,7 +21,6 @@
package org.onap.so.adapters.inventory.delete;
import javax.annotation.PostConstruct;
-import org.camunda.bpm.client.ExternalTaskClient;
import org.onap.so.utils.ExternalTaskServiceUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Profile;
@@ -43,10 +42,11 @@ public class DeleteInventoryService {
@PostConstruct
public void auditAAIInventory() throws Exception {
- ExternalTaskClient client = externalTaskServiceUtils.createExternalTaskClient();
- client.subscribe("InventoryDelete")
- .lockDuration(Long.parseLong(env.getProperty("mso.audit.lock-time", "60000")))
- .handler(deleteInventory::executeExternalTask).open();
+ for (int i = 0; i < externalTaskServiceUtils.getMaxClients(); i++) {
+ externalTaskServiceUtils.createExternalTaskClient().subscribe("InventoryDelete")
+ .lockDuration(Long.parseLong(env.getProperty("mso.audit.lock-time", "60000")))
+ .handler(deleteInventory::executeExternalTask).open();
+ }
}
}