[游戏管理]游戏对局-创建游戏对局service
This commit is contained in:
19
app/process/GamePeriodAutoTicker.php
Normal file
19
app/process/GamePeriodAutoTicker.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace app\process;
|
||||
|
||||
use app\common\service\GamePeriodService;
|
||||
use Workerman\Timer;
|
||||
|
||||
/**
|
||||
* 定时检查:开启自动创建且无进行中期号时插入新期(全局仅一局)
|
||||
*/
|
||||
class GamePeriodAutoTicker
|
||||
{
|
||||
public function onWorkerStart(): void
|
||||
{
|
||||
Timer::add(15, static function (): void {
|
||||
GamePeriodService::tickAutoCreate();
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user