summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/functions
diff options
context:
space:
mode:
Diffstat (limited to 'ms/blueprintsprocessor/functions')
-rw-r--r--ms/blueprintsprocessor/functions/message-prioritizaion/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/service/MessagePrioritizationSchedulerService.kt9
-rw-r--r--ms/blueprintsprocessor/functions/message-prioritizaion/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/MessagePrioritizationConsumerTest.kt2
2 files changed, 6 insertions, 5 deletions
diff --git a/ms/blueprintsprocessor/functions/message-prioritizaion/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/service/MessagePrioritizationSchedulerService.kt b/ms/blueprintsprocessor/functions/message-prioritizaion/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/service/MessagePrioritizationSchedulerService.kt
index 2f08c1c34..aaefcc773 100644
--- a/ms/blueprintsprocessor/functions/message-prioritizaion/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/service/MessagePrioritizationSchedulerService.kt
+++ b/ms/blueprintsprocessor/functions/message-prioritizaion/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/service/MessagePrioritizationSchedulerService.kt
@@ -38,10 +38,10 @@ open class MessagePrioritizationSchedulerService(
/** This is sample scheduler implementation used during starting application with configuration.
@EventListener(ApplicationReadyEvent::class)
open fun init() = runBlocking {
- log.info("Starting PrioritizationListeners...")
- startScheduling(MessagePrioritizationSample.samplePrioritizationConfiguration())
+ log.info("Starting PrioritizationListeners...")
+ startScheduling(MessagePrioritizationSample.samplePrioritizationConfiguration())
}
- */
+ */
open suspend fun startScheduling() {
val prioritizationConfiguration = messagePrioritizationService.getConfiguration()
@@ -55,8 +55,9 @@ open class MessagePrioritizationSchedulerService(
}
}
- open suspend fun shutdownScheduling(prioritizationConfiguration: PrioritizationConfiguration) {
+ open suspend fun shutdownScheduling() {
keepGoing = false
+ val prioritizationConfiguration = messagePrioritizationService.getConfiguration()
delay(prioritizationConfiguration.shutDownConfiguration.waitMill)
}
diff --git a/ms/blueprintsprocessor/functions/message-prioritizaion/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/MessagePrioritizationConsumerTest.kt b/ms/blueprintsprocessor/functions/message-prioritizaion/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/MessagePrioritizationConsumerTest.kt
index 7f150f5f3..35bc49402 100644
--- a/ms/blueprintsprocessor/functions/message-prioritizaion/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/MessagePrioritizationConsumerTest.kt
+++ b/ms/blueprintsprocessor/functions/message-prioritizaion/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/MessagePrioritizationConsumerTest.kt
@@ -207,7 +207,7 @@ open class MessagePrioritizationConsumerTest {
launch {
/** To debug increase the delay time */
delay(20)
- messagePrioritizationSchedulerService.shutdownScheduling(configuration)
+ messagePrioritizationSchedulerService.shutdownScheduling()
}
}
}