1.修复关闭自动创建下一局后还自动创建下一期
This commit is contained in:
@@ -261,6 +261,7 @@ final class GameLiveService
|
||||
}
|
||||
if (!GameRecordService::isLiveRuntimeEnabled()) {
|
||||
self::voidRemainingOpenRoundsOnMaintenanceAfterFinalize();
|
||||
GameHotDataRedis::gameRecordRefreshAggregateCaches();
|
||||
} elseif (is_string($newPeriodNo ?? null) && $newPeriodNo !== '') {
|
||||
self::publishImmediateBettingTickAfterFinalize();
|
||||
}
|
||||
@@ -716,6 +717,7 @@ final class GameLiveService
|
||||
self::publishSnapshot(null);
|
||||
if (!GameRecordService::isLiveRuntimeEnabled()) {
|
||||
self::voidRemainingOpenRoundsOnMaintenanceAfterFinalize();
|
||||
GameHotDataRedis::gameRecordRefreshAggregateCaches();
|
||||
} elseif (is_string($newPeriodNo ?? null) && $newPeriodNo !== '') {
|
||||
self::publishImmediateBettingTickAfterFinalize();
|
||||
}
|
||||
@@ -726,6 +728,12 @@ final class GameLiveService
|
||||
|
||||
public static function tickAutoDraw(): void
|
||||
{
|
||||
if (!GameRecordService::isAutoCreateEnabled()) {
|
||||
$openCount = (int) Db::name('game_record')->whereIn('status', [0, 1])->count();
|
||||
if ($openCount <= 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
$record = self::resolveRecord(null);
|
||||
if (!$record || !in_array((int) $record['status'], [0, 1], true)) {
|
||||
return;
|
||||
@@ -801,6 +809,7 @@ final class GameLiveService
|
||||
self::voidOpenPeriodInternal($rid, $reason);
|
||||
}
|
||||
GameHotDataRedis::gameRecordRefreshAggregateCaches();
|
||||
self::publishSnapshot(null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1145,6 +1154,9 @@ final class GameLiveService
|
||||
if (!self::shouldPublishPeriodTick($status, $periodNo)) {
|
||||
return;
|
||||
}
|
||||
if (empty($snapshot['runtime_enabled']) && in_array($status, ['betting', 'locked'], true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
GameWebSocketEventBus::publish(self::EVT_PERIOD_TICK, $payload);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user