File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
src/main/kotlin/org/gitanimals/render/infra Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -52,13 +52,10 @@ class VisitedEventListener(
5252 )
5353 logger.info(" [VisitedEventListener] Increase point to user. username: \" $username \" , point:\" ${increaseContributionCount * 100 } \" " )
5454 }.onFailure {
55- if (it !is IllegalArgumentException ) {
56- logger.error(
57- " [VisitedEventListener] Cannot increase visit or point to user. username: \" ${visited.username} \" " , it
58- )
59- }
60- if (it !is CannotAcquireLockException ) {
61- logger.warn(" [VisitedEventListener] Deadlock found." , it)
55+ when (it) {
56+ is CannotAcquireLockException -> logger.warn(" [VisitedEventListener] Deadlock found." , it)
57+ is IllegalArgumentException -> {} // DO NOTHING
58+ else -> logger.error(" [VisitedEventListener] Cannot increase visit or point to user. username: \" ${visited.username} \" " , it)
6259 }
6360 }.also {
6461 MDC .remove(TRACE_ID )
You can’t perform that action at this time.
0 commit comments