Skip to content

Commit

Permalink
feat: 引擎等MQ场景接入SCS框架 #7443 接入websocket和auth服务
Browse files Browse the repository at this point in the history
  • Loading branch information
royalhuang committed Oct 14, 2022
1 parent 45feb83 commit e5a6a6b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ class WebsocketConfiguration {
}

@Bean
fun transferDispatch(
streamBridge: StreamBridge
): TransferDispatch {
return TransferDispatch(streamBridge)
fun transferDispatch(): TransferDispatch {
return TransferDispatch()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ import com.tencent.devops.common.web.RestResource
import com.tencent.devops.websocket.api.UserWebsocketResource
import com.tencent.devops.websocket.servcie.WebsocketService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.cloud.stream.function.StreamBridge

@RestResource
class UserWebsocketResourceImpl @Autowired constructor(
val websocketService: WebsocketService

val websocketService: WebsocketService,
val streamBridge: StreamBridge
) : UserWebsocketResource {
override fun clearSession(userId: String, sessionId: String): Result<Boolean> {
return websocketService.clearAllBySession(userId, sessionId)
return websocketService.clearAllBySession(streamBridge, userId, sessionId)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class SessionHandler @Autowired constructor(
super.afterConnectionClosed(session, closeStatus)
} else {
logger.info("connection closed closeStatus[$closeStatus] user[$userId] page[$page], session[$sessionId]")
websocketService.clearAllBySession(userId, sessionId)
websocketService.removeCacheSession(sessionId)
}

super.afterConnectionClosed(session, closeStatus)
Expand Down

0 comments on commit e5a6a6b

Please sign in to comment.