feat: 优化 DrawCurrentController 和 LotteryHallRealtimeBroadcaster 的响应结构
This commit is contained in:
@@ -21,17 +21,16 @@ final class LotteryHallRealtimeBroadcaster
|
||||
private readonly DrawHallSnapshotBuilder $snapshot,
|
||||
) {}
|
||||
|
||||
/** 每秒调度:`draw.countdown` */
|
||||
/** 每秒调度:`draw.countdown` 仅发送轻量心跳,不重查全量大厅快照。 */
|
||||
public function countdownPulse(): void
|
||||
{
|
||||
if (! $this->driverSupportsRealtime()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$data = $this->snapshot->build();
|
||||
$ms = (int) floor(microtime(true) * 1000);
|
||||
|
||||
broadcast(new DrawCountdownBroadcast($data, $ms));
|
||||
broadcast(new DrawCountdownBroadcast(null, $ms));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user