refactor(analytics): do some internal refactor.

This commit is contained in:
Haojun Liao 2025-03-04 13:40:33 +08:00
parent f85347b311
commit 8c035a930a
2 changed files with 2 additions and 1 deletions

View File

@ -31,6 +31,7 @@ extern "C" {
#define ANAL_FORECAST_MAX_ROWS 40000
#define ANAL_ANOMALY_WINDOW_MAX_ROWS 40000
#define ANALY_FC_DEFAULT_TIMEOUT 60000
#define ANALY_FC_MAX_TIMEOUT (600*1000)
typedef struct {
EAnalAlgoType type;

View File

@ -537,7 +537,7 @@ static int32_t forecastParseAlgo(SForecastSupp* pSupp, const char* id) {
qDebug("%s not set the timeout val, set default:%d", id, ANALY_FC_DEFAULT_TIMEOUT);
pSupp->timeout = ANALY_FC_DEFAULT_TIMEOUT;
} else {
if (pSupp->timeout <= 500 || pSupp->timeout > 600*1000) {
if (pSupp->timeout <= 500 || pSupp->timeout > ANALY_FC_MAX_TIMEOUT) {
qDebug("%s timeout val:%" PRId64 "ms is invalid (greater than 10min or less than 0.5s), use default:%" PRId64 "ms",
id, pSupp->timeout, ANALY_FC_DEFAULT_TIMEOUT);
pSupp->timeout = ANALY_FC_DEFAULT_TIMEOUT;