refactor: 将广播事件改为异步队列并增强索引检查兼容性
This commit is contained in:
@@ -6,7 +6,7 @@ use Illuminate\Broadcasting\Channel;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Foundation\Events\Dispatchable;
|
||||
use Illuminate\Broadcasting\InteractsWithSockets;
|
||||
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
|
||||
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
||||
|
||||
/**
|
||||
* 界面文档扩展:`play.catalog_updated` —— 玩法目录/限额/封顶等生效版本变更。
|
||||
@@ -14,10 +14,19 @@ use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
|
||||
* 触发时机:后台发布玩法配置、赔率、风控封顶版本(及同类全量变更)时。
|
||||
* 前端处理:重新拉取 `GET /api/v1/play/effective`。
|
||||
*/
|
||||
final class PlayCatalogUpdatedBroadcast implements ShouldBroadcastNow
|
||||
final class PlayCatalogUpdatedBroadcast implements ShouldBroadcast
|
||||
{
|
||||
use Dispatchable, InteractsWithSockets, SerializesModels;
|
||||
|
||||
/** 异步广播队列 */
|
||||
public string $queue = 'broadcasts';
|
||||
|
||||
/** 最多重试 3 次 */
|
||||
public int $tries = 3;
|
||||
|
||||
/** 单任务超时 10 秒 */
|
||||
public int $timeout = 10;
|
||||
|
||||
/**
|
||||
* @param string $module play_config|odds|risk_cap
|
||||
* @param array<string, mixed>|null $meta
|
||||
|
||||
Reference in New Issue
Block a user