后台游戏对局实时显示-优化

This commit is contained in:
2026-04-16 16:36:57 +08:00
parent c7149e7058
commit 015d1e4d5b
12 changed files with 499 additions and 212 deletions

View File

@@ -0,0 +1,20 @@
<?php
namespace app\process;
use app\common\service\GameLiveService;
use Workerman\Timer;
/**
* 实时对局:按单局时长自动开奖
*/
class GameLiveTicker
{
public function onWorkerStart(): void
{
Timer::add(1, static function (): void {
GameLiveService::tickAutoDraw();
GameLiveService::publishSnapshot(null);
});
}
}