This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
/**
* embed 前端轮询上限
* 须 ≥ SESSION_MAX_ROTATIONS × 单轮 RPA 耗时(3×~60s);客户端仅 NEXT_PUBLIC_ 生效
*/
export const FLOCK_POLL_TIMEOUT_DEFAULT_MS = 210_000;
/** 浏览器端可读(NEXT_PUBLIC_);服务端可读 FLOCK_POLL_TIMEOUT_MS */
export function getFlockPollTimeoutMs(): number {
const raw =
process.env.NEXT_PUBLIC_FLOCK_POLL_TIMEOUT_MS ??
process.env.FLOCK_POLL_TIMEOUT_MS ??
String(FLOCK_POLL_TIMEOUT_DEFAULT_MS);
const n = Number(raw);
return Number.isFinite(n) && n > 0 ? n : FLOCK_POLL_TIMEOUT_DEFAULT_MS;
}