mirror of https://github.com/usbharu/Hideout.git
style: fix lint
This commit is contained in:
parent
1c80911365
commit
9ed85bae07
|
@ -38,7 +38,6 @@ class SubscriberRunner(
|
|||
|
||||
logger.debug("{}{}{}", header, value, footer)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
|
|
@ -22,7 +22,6 @@ class TimelineRelationshipFollowSubscriber(
|
|||
domainEventSubscriber.subscribe<RelationshipEventBody>(RelationshipEvent.ACCEPT_FOLLOW.eventName, this)
|
||||
}
|
||||
|
||||
|
||||
override suspend fun invoke(p1: DomainEvent<RelationshipEventBody>) {
|
||||
val relationship = p1.body.getRelationship()
|
||||
val userDetail = userDetailRepository.findByActorId(relationship.actorId.id)
|
||||
|
|
|
@ -32,7 +32,8 @@ class SpringFrameworkDomainEventPublisher(private val applicationEventPublisher:
|
|||
|
||||
val requestId: String? = MDC.get(ApplicationRequestLogInterceptor.requestId)
|
||||
val springDomainEvent = SpringDomainEvent(
|
||||
requestId, domainEvent
|
||||
requestId,
|
||||
domainEvent
|
||||
)
|
||||
|
||||
applicationEventPublisher.publishEvent(springDomainEvent)
|
||||
|
@ -43,4 +44,4 @@ class SpringFrameworkDomainEventPublisher(private val applicationEventPublisher:
|
|||
}
|
||||
}
|
||||
|
||||
data class SpringDomainEvent(val requestId: String?, val domainEvent: DomainEvent<*>)
|
||||
data class SpringDomainEvent(val requestId: String?, val domainEvent: DomainEvent<*>)
|
||||
|
|
|
@ -22,13 +22,10 @@ class SpringFrameworkDomainEventSubscriber : DomainEventSubscriber {
|
|||
map.getOrPut(eventName) { mutableListOf() }.add(domainEventConsumer as DomainEventConsumer<*>)
|
||||
}
|
||||
|
||||
override fun getSubscribers(): Map<String, List<DomainEventConsumer<*>>> {
|
||||
return map
|
||||
}
|
||||
override fun getSubscribers(): Map<String, List<DomainEventConsumer<*>>> = map
|
||||
|
||||
@EventListener
|
||||
suspend fun onDomainEventPublished(domainEvent: SpringDomainEvent) {
|
||||
|
||||
logger.debug(
|
||||
"Domain Event Published: {} id: {} requestId: {}",
|
||||
domainEvent.domainEvent.name,
|
||||
|
@ -36,7 +33,6 @@ class SpringFrameworkDomainEventSubscriber : DomainEventSubscriber {
|
|||
domainEvent.requestId
|
||||
)
|
||||
coroutineScope {
|
||||
|
||||
map[domainEvent.domainEvent.name]?.map {
|
||||
async(MDCContext()) {
|
||||
try {
|
||||
|
@ -50,7 +46,6 @@ class SpringFrameworkDomainEventSubscriber : DomainEventSubscriber {
|
|||
}
|
||||
}
|
||||
}?.awaitAll()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue