|
@@ -149,11 +149,12 @@ pub async fn init(params: Params,
|
|
|
|
|
|
|
|
sleep_until(target_instant).await;
|
|
sleep_until(target_instant).await;
|
|
|
// 防止过快循环,等待一分钟后再继续下一次循环
|
|
// 防止过快循环,等待一分钟后再继续下一次循环
|
|
|
-
|
|
|
|
|
- // 更新近1天(昨8点~今8点)的交易量统计
|
|
|
|
|
- let mut core = trade_volume_core_arc.lock().await;
|
|
|
|
|
- core.update_trade_volume().await;
|
|
|
|
|
-
|
|
|
|
|
|
|
+ {
|
|
|
|
|
+ // 更新近1天(昨8点~今8点)的交易量统计
|
|
|
|
|
+ let mut core = trade_volume_core_arc.lock().await;
|
|
|
|
|
+ core.update_trade_volume().await;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 等待一分钟以避免过快地循环
|
|
// 等待一分钟以避免过快地循环
|
|
|
sleep_until(Instant::now() + Duration::from_secs(5*60)).await;
|
|
sleep_until(Instant::now() + Duration::from_secs(5*60)).await;
|
|
|
}
|
|
}
|