chore(mobile-app): 缩短合同检查定时器间隔至5-20秒
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
6237a49153
commit
838fbce914
|
|
@ -83,12 +83,12 @@ class _HomeShellPageState extends ConsumerState<HomeShellPage>
|
||||||
_scheduleNextContractCheck();
|
_scheduleNextContractCheck();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 安排下一次合同检查(随机 60-180 秒)
|
/// 安排下一次合同检查(随机 5-20 秒)
|
||||||
void _scheduleNextContractCheck() {
|
void _scheduleNextContractCheck() {
|
||||||
_contractCheckTimer?.cancel();
|
_contractCheckTimer?.cancel();
|
||||||
|
|
||||||
// 随机 60-180 秒(1-3分钟)
|
// 随机 5-20 秒
|
||||||
final randomSeconds = 60 + Random().nextInt(121); // 60 + 0~120 = 60~180
|
final randomSeconds = 5 + Random().nextInt(16); // 5 + 0~15 = 5~20
|
||||||
debugPrint('[HomeShellPage] 下次合同检查将在 $randomSeconds 秒后执行');
|
debugPrint('[HomeShellPage] 下次合同检查将在 $randomSeconds 秒后执行');
|
||||||
|
|
||||||
_contractCheckTimer = Timer(Duration(seconds: randomSeconds), () async {
|
_contractCheckTimer = Timer(Duration(seconds: randomSeconds), () async {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue