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:
2021-02-04 02:36:02 +01:00
parent a05b5edc86
commit 89c15eb1cf
26 changed files with 289 additions and 149 deletions

View File

@@ -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())
}
}

View File

@@ -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)
}
}