summaryrefslogtreecommitdiffstats
path: root/adapters/mso-openstack-adapters/src/main/java/org/onap
diff options
context:
space:
mode:
authorBoslet, Cory <cory.boslet@att.com>2020-06-25 08:49:10 -0400
committerBenjamin, Max (mb388a) <mb388a@att.com>2020-06-25 08:49:10 -0400
commit0a430810ec28976d53edf371382c781515937920 (patch)
tree1a5a0572b297f100245f2e44c50fd71667a99214 /adapters/mso-openstack-adapters/src/main/java/org/onap
parent9f4721c6858cd3dc1b94b22febd2fe5e38f8de3c (diff)
Loop over max clients to fix topic not getting
Loop over max clients to fix topic not getting subscribed. Issue-ID: SO-3007 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I8a63fed874946528d1318bfa2e10e663c688444b
Diffstat (limited to 'adapters/mso-openstack-adapters/src/main/java/org/onap')
-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();
+ }
}
}
'#n279'>279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387