Merge remote-tracking branch 'origin/dev_robotaxi-d_250117_6.10.0_del_login_loop' into dev_robotaxi-d_250417_8.0.0

# Conflicts:
#	OCH/common/biz/src/main/java/com/mogo/och/biz/login/ui/debugview/BusinessView.kt
This commit is contained in:
yangyakun
2025-05-16 11:45:35 +08:00
4 changed files with 12 additions and 11 deletions

View File

@@ -66,14 +66,14 @@ object LoginServiceManager : IOchLanPassengerStatusListener {
if (oldValue != newValue) { if (oldValue != newValue) {
OchChainLogManager.writeChainLog("登录状态变化", "${oldValue}-->${newValue}") OchChainLogManager.writeChainLog("登录状态变化", "${oldValue}-->${newValue}")
Log.d(tag, "登录状态变化:${oldValue}-->${newValue}") Log.d(tag, "登录状态变化:${oldValue}-->${newValue}")
if (newValue == EnumLoginStatus.Login && AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) { // if (newValue == EnumLoginStatus.Login && AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
BizLoopManager.setLoopFunction( // BizLoopManager.setLoopFunction(
TAGLoopStatus, // TAGLoopStatus,
LoopInfo(60 * 2, ::queryLoginStatusByNet, immediately = false, scheduler = Schedulers.io()) // LoopInfo(60 * 2, ::queryLoginStatusByNet, immediately = false, scheduler = Schedulers.io())
) // )
} else { // } else {
BizLoopManager.removeLoopFunction(TAGLoopStatus) // BizLoopManager.removeLoopFunction(TAGLoopStatus)
} // }
LoginStatusManager.invokeLoginStatusChange(loginStatus) LoginStatusManager.invokeLoginStatusChange(loginStatus)
} }
} }

View File

@@ -15,7 +15,6 @@ class FRetryWithTime<T : BaseData> : Function<T, ObservableSource<T>> {
override fun apply(baseData: T): ObservableSource<T> { override fun apply(baseData: T): ObservableSource<T> {
baseData.let { baseData.let {
if (it.code == 100046 || it.code == 100045 || it.code == 100005 || it.code == 100006 || it.code == 520003) { if (it.code == 100046 || it.code == 100045 || it.code == 100005 || it.code == 100006 || it.code == 520003) {
MoGoAiCloudClient.getInstance().refreshToken()
return Observable.error(OchCommonRetryException()) return Observable.error(OchCommonRetryException())
}else if(it.code == 1003){ }else if(it.code == 1003){
CallerLogger.e(M_OCHCOMMON, "接口失败报错 1003:需重新查询登录状态") CallerLogger.e(M_OCHCOMMON, "接口失败报错 1003:需重新查询登录状态")

View File

@@ -3,6 +3,7 @@ package com.mogo.och.common.module.network.interceptor
import com.mogo.eagle.core.utilcode.constant.TimeConstants import com.mogo.eagle.core.utilcode.constant.TimeConstants
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.util.TimeUtils import com.mogo.eagle.core.utilcode.util.TimeUtils
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
import com.mogo.och.common.module.utils.CallerLoggerUtils.flavorTag import com.mogo.och.common.module.utils.CallerLoggerUtils.flavorTag
import io.reactivex.Observable import io.reactivex.Observable
import io.reactivex.ObservableSource import io.reactivex.ObservableSource
@@ -15,12 +16,13 @@ class RetryWithTime : Function<Observable<Throwable?>, ObservableSource<Any?>> {
private const val TAG = "RetryWithTime" private const val TAG = "RetryWithTime"
} }
var current = -1 var current = -1
private var timeDelys = intArrayOf(3, 1, 2) private var timeDelys = intArrayOf(6, 2, 4)
override fun apply(throwableObservable: Observable<Throwable?>): ObservableSource<Any?>? { override fun apply(throwableObservable: Observable<Throwable?>): ObservableSource<Any?>? {
return throwableObservable.flatMap { return throwableObservable.flatMap {
++current ++current
CallerLogger.e("${flavorTag}$TAG", " 时间:${TimeUtils.getStringByNow(0, TimeConstants.SEC)}") CallerLogger.e("${flavorTag}$TAG", " 时间:${TimeUtils.getStringByNow(0, TimeConstants.SEC)}")
if (it is OchCommonRetryException && current < timeDelys.size) { if (it is OchCommonRetryException && current < timeDelys.size) {
OchChainLogManager.writeChainLogError("token超时","${timeDelys[current]}s后重试")
Observable.timer(timeDelys[current].toLong(), TimeUnit.SECONDS) Observable.timer(timeDelys[current].toLong(), TimeUnit.SECONDS)
} else { } else {
Observable.error(it) Observable.error(it)

View File

@@ -66,7 +66,7 @@ LOGLIB_VERSION=1.10.18
# 网络请求LOGLIB_VERSION # 网络请求LOGLIB_VERSION
MOGO_NETWORK_VERSION=1.4.7.58 MOGO_NETWORK_VERSION=1.4.7.58
# 鉴权 # 鉴权
MOGO_PASSPORT_VERSION=1.4.7.58 MOGO_PASSPORT_VERSION=1.4.7.63
# 长链接 # 长链接
MOGO_SOCKET_VERSION=1.4.7.58 MOGO_SOCKET_VERSION=1.4.7.58
# 数据采集 # 数据采集