Skip to content

Commit

Permalink
feat: fs客户端心跳支持上报ip #2862
Browse files Browse the repository at this point in the history
  • Loading branch information
yaoxuwan authored Dec 17, 2024
1 parent 293578f commit ad4a584
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ data class ClientCreateRequest(
val version: String,
val os: String,
val arch: String,
val ip: String?,
)
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class ClientService(

suspend fun createClient(request: ClientCreateRequest): ClientDetail {
with(request) {
val ip = ReactiveRequestContextHolder.getClientAddress()
val ip = if (this.ip.isNullOrBlank()) ReactiveRequestContextHolder.getClientAddress() else this.ip
val query = Query(
Criteria.where(TClient::projectId.name).isEqualTo(projectId)
.and(TClient::repoName.name).isEqualTo(repoName)
Expand Down Expand Up @@ -277,7 +277,8 @@ class ClientService(
mountPoint = client.mountPoint,
version = client.version,
os = client.os,
arch = client.arch
arch = client.arch,
ip = client.ip
)
}

Expand Down

0 comments on commit ad4a584

Please sign in to comment.