cleanup and refactoring of notification
close rabbit and redis connexion on application close Refactoring of Configuration class fix notification id increment Add builder for NotificationPush Add close to notificationPush to remove listener Clean tags of tests purge queue before functional tests
This commit is contained in:
@@ -7,5 +7,8 @@ import org.koin.dsl.module
|
||||
val authKoinModule = module {
|
||||
single { UserRepository(get()) }
|
||||
// Used to send a connexion link by email
|
||||
single { PasswordlessAuth(get<Mailer>(), Configuration.domain, get()) }
|
||||
single {
|
||||
val config: Configuration = get()
|
||||
PasswordlessAuth(get<Mailer>(), config.domain, get())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,12 +8,15 @@ import org.elasticsearch.client.RestClient
|
||||
import org.koin.dsl.module
|
||||
|
||||
val viewKoinModule = module {
|
||||
// Elasticsearch Client
|
||||
val esClient = RestClient.builder(
|
||||
HttpHost.create(Configuration.elasticsearch)
|
||||
).build().apply {
|
||||
createEsIndexForViews()
|
||||
}
|
||||
|
||||
single { ArticleViewManager<ArticleForView>(esClient) }
|
||||
single {
|
||||
val config: Configuration = get()
|
||||
// Elasticsearch Client
|
||||
val esClient = RestClient.builder(
|
||||
HttpHost.create(config.elasticsearch)
|
||||
).build().apply {
|
||||
createEsIndexForViews()
|
||||
}
|
||||
ArticleViewManager<ArticleForView>(esClient)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user