diff --git a/src/backend/turbo/biz-turbo/build.gradle.kts b/src/backend/turbo/biz-turbo/build.gradle.kts index 8be24062..62bf066b 100644 --- a/src/backend/turbo/biz-turbo/build.gradle.kts +++ b/src/backend/turbo/biz-turbo/build.gradle.kts @@ -1,6 +1,7 @@ dependencies { api(project(":api-turbo")) api(project(":model-turbo")) + api(project(":common-turbo:common-turbo-api")) api(project(":common-turbo:common-turbo-client")) api(project(":common-turbo:common-turbo-web")) api(project(":common-turbo:common-turbo-quartz")) diff --git a/src/backend/turbo/biz-turbo/src/main/kotlin/com/tencent/devops/turbo/service/TurboWorkStatService.kt b/src/backend/turbo/biz-turbo/src/main/kotlin/com/tencent/devops/turbo/service/TurboWorkStatService.kt index 36f8df36..7ecd785b 100644 --- a/src/backend/turbo/biz-turbo/src/main/kotlin/com/tencent/devops/turbo/service/TurboWorkStatService.kt +++ b/src/backend/turbo/biz-turbo/src/main/kotlin/com/tencent/devops/turbo/service/TurboWorkStatService.kt @@ -4,7 +4,7 @@ package com.tencent.devops.turbo.service import com.fasterxml.jackson.core.type.TypeReference import com.tencent.devops.common.api.exception.TurboException import com.tencent.devops.common.api.exception.code.TURBO_THIRDPARTY_SYSTEM_FAIL -import com.tencent.devops.common.api.util.OkhttpUtil +import com.tencent.devops.common.api.util.OkhttpUtils import com.tencent.devops.common.util.JsonUtil import com.tencent.devops.turbo.dao.repository.TurboRecordRepository import com.tencent.devops.turbo.dao.repository.TurboWorkJobStatsDataRepository @@ -41,7 +41,7 @@ class TurboWorkStatService @Autowired constructor( */ fun getTbsWorkStatData(turboRecordId: String): TurboWorkStatsDto { val tbsWorkStatDataStr: String = try { - OkhttpUtil.doGet( + OkhttpUtils.doGet( url = "$tbsRootPath/api/v1/disttask/work_stats/?decode_job=1&task_id=$turboRecordId" ) } catch (e: Exception) { diff --git a/src/backend/turbo/common-turbo/common-turbo-api/src/main/kotlin/com/tencent/devops/common/api/util/OkhttpUtils.kt b/src/backend/turbo/common-turbo/common-turbo-api/src/main/kotlin/com/tencent/devops/common/api/util/OkhttpUtils.kt index deee1bfd..681aa30a 100644 --- a/src/backend/turbo/common-turbo/common-turbo-api/src/main/kotlin/com/tencent/devops/common/api/util/OkhttpUtils.kt +++ b/src/backend/turbo/common-turbo/common-turbo-api/src/main/kotlin/com/tencent/devops/common/api/util/OkhttpUtils.kt @@ -28,7 +28,7 @@ object OkhttpUtils { .url(url) .get() if (headers.isNotEmpty()) { - headers.forEach { key, value -> + headers.forEach { (key, value) -> requestBuilder.addHeader(key, value) } }