Skip to content

Commit 71703ed

Browse files
authored
release: 2.3.7 (#421)
2 parents 372a85e + 0dd9e35 commit 71703ed

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

โ€Žsrc/main/kotlin/org/gitanimals/core/lock/DistributedLock.ktโ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ object DistributedLock {
2323
key = key,
2424
leaseMillis = leaseMillis,
2525
waitMillis = waitMillis,
26-
action = action,
2726
whenAcquireFail = whenAcquireFailed,
27+
action = action,
2828
)
2929
}
3030

โ€Žsrc/main/kotlin/org/gitanimals/render/app/AnimationFacade.ktโ€Ž

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import org.gitanimals.core.UpdateUserOrchestrator
55
import org.gitanimals.core.auth.UserEntryPoint
66
import org.gitanimals.core.filter.MDCFilter.Companion.TRACE_ID
77
import org.gitanimals.core.lock.DistributedLock
8-
import org.gitanimals.core.lock.LOCK_KEY_PREFIX
98
import org.gitanimals.core.lock.LOCK_KEY_PREFIX.CREATE_NEW_USER
109
import org.gitanimals.render.domain.EntryPoint
1110
import org.gitanimals.render.domain.User
@@ -34,9 +33,7 @@ class AnimationFacade(
3433
fun getFarmAnimation(username: String): String {
3534
return when (userService.existsByName(username)) {
3635
true -> {
37-
DistributedLock.withLock(key = "${LOCK_KEY_PREFIX.SET_AUTH}:$username") {
38-
setUserAuthInfoIfNotSet(username)
39-
}
36+
setUserAuthInfoIfNotSet(username)
4037

4138
val svgAnimation = userService.getFarmAnimationByUsername(username)
4239
eventPublisher.publishEvent(Visited(username, MDC.get(TRACE_ID)))
@@ -53,9 +50,7 @@ class AnimationFacade(
5350
fun getLineAnimation(username: String, personaId: Long, mode: Mode): String {
5451
return when (userService.existsByName(username)) {
5552
true -> {
56-
DistributedLock.withLock(key = "${LOCK_KEY_PREFIX.SET_AUTH}:$username") {
57-
setUserAuthInfoIfNotSet(username)
58-
}
53+
setUserAuthInfoIfNotSet(username)
5954

6055
val svgAnimation = userService.getLineAnimationByUsername(username, personaId, mode)
6156
eventPublisher.publishEvent(Visited(username, MDC.get(TRACE_ID)))

0 commit comments

Comments
ย (0)