File tree Expand file tree Collapse file tree
src/main/kotlin/co/statu/parsek Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import io.vertx.core.VertxOptions
1010import io.vertx.ext.web.Router
1111import io.vertx.kotlin.coroutines.CoroutineVerticle
1212import io.vertx.kotlin.coroutines.coAwait
13+ import kotlinx.coroutines.runBlocking
1314import org.slf4j.LoggerFactory
1415import org.springframework.context.annotation.AnnotationConfigApplicationContext
1516
@@ -130,7 +131,17 @@ class Main : CoroutineVerticle() {
130131
131132 logger.info(" Enabling plugins" )
132133
134+ pluginManager.getPluginWrappers().forEach {
135+ pluginManager.enablePlugin(it.pluginId)
136+ }
137+
133138 pluginManager.startPlugins()
139+
140+ runBlocking {
141+ pluginManager.getActivePlugins().forEach {
142+ it.onStart()
143+ }
144+ }
134145 }
135146
136147 private fun initDependencyInjection () {
Original file line number Diff line number Diff line change @@ -90,11 +90,6 @@ abstract class ParsekPlugin : Plugin() {
9090
9191 @Deprecated(" Use onStart method." )
9292 override fun start () {
93- runBlocking {
94- withContext(Dispatchers .IO ) {
95- onStart()
96- }
97- }
9893 }
9994
10095 @Deprecated(" Use onStop method." )
You can’t perform that action at this time.
0 commit comments