aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorsblimkie <sb787e@att.com>2018-12-04 14:44:04 -0500
committersblimkie <steven.blimkie@amdocs.com>2018-12-04 14:51:15 -0500
commit9a6079fe14815e6f247268ce32b3157cf95d734b (patch)
treee3b25c25f2a98c2d4cfb9522f5128e3ab8670da7 /src/main
parentd894ec51a86cfb4d711d3c053d8aa46759584456 (diff)
Fix issue with Spike using too much CPU
Even when idle, Spike was using close to 100% CPU Change-Id: I9936028e6935f54a9683cc57316c7d97205d5316 Issue-ID: AAI-1985 Signed-off-by: sblimkie <steven.blimkie@amdocs.com>
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/onap/aai/spike/service/SpikeEventProcessor.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/org/onap/aai/spike/service/SpikeEventProcessor.java b/src/main/java/org/onap/aai/spike/service/SpikeEventProcessor.java
index 88fa716..cd404b0 100644
--- a/src/main/java/org/onap/aai/spike/service/SpikeEventProcessor.java
+++ b/src/main/java/org/onap/aai/spike/service/SpikeEventProcessor.java
@@ -246,6 +246,8 @@ public class SpikeEventProcessor extends TimerTask {
|| eventQueue.size() > eventQueueCapacity)) {
event = eventQueue.take();
} else {
+ // Small pause so that we aren't burning CPU
+ Thread.sleep(200);
continue;
}