feat: 优化开发环境脚本与大厅倒计时调度配置
1. 默认会话、队列和缓存驱动切换为 Redis 2. 拆分 dev、dev:realtime 和 dev:schedule 脚本,支持按需启动实时与调度进程 3. 新增大厅倒计时调度配置开关,支持关闭每秒广播任务
This commit is contained in:
@@ -80,7 +80,7 @@ DB_PASSWORD=
|
|||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
|
||||||
# 会话驱动:file / cookie / database / redis 等
|
# 会话驱动:file / cookie / database / redis 等
|
||||||
SESSION_DRIVER=database
|
SESSION_DRIVER=redis
|
||||||
# 会话存活时间(分钟)
|
# 会话存活时间(分钟)
|
||||||
SESSION_LIFETIME=120
|
SESSION_LIFETIME=120
|
||||||
# 是否加密会话数据
|
# 是否加密会话数据
|
||||||
@@ -114,9 +114,9 @@ FILESYSTEM_DISK=local
|
|||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
|
||||||
# 队列驱动:sync(同步)/ database / redis 等;本地常用 database
|
# 队列驱动:sync(同步)/ database / redis 等;本地常用 database
|
||||||
QUEUE_CONNECTION=database
|
QUEUE_CONNECTION=redis
|
||||||
# 缓存存储:file / database / redis 等;与 Redis 赔付池等能力对接前可用 database
|
# 缓存存储:file / database / redis 等;与 Redis 赔付池等能力对接前可用 database
|
||||||
CACHE_STORE=database
|
CACHE_STORE=redis
|
||||||
# 缓存键全局前缀;多环境共 Redis 时可用于隔离,一般可留空使用框架默认
|
# 缓存键全局前缀;多环境共 Redis 时可用于隔离,一般可留空使用框架默认
|
||||||
# CACHE_PREFIX=
|
# CACHE_PREFIX=
|
||||||
|
|
||||||
|
|||||||
@@ -172,6 +172,8 @@ return Application::configure(basePath: dirname(__DIR__))
|
|||||||
->everyTenMinutes()
|
->everyTenMinutes()
|
||||||
->withoutOverlapping();
|
->withoutOverlapping();
|
||||||
/** @see docs/01-界面文档.md §2.1 `draw.countdown` */
|
/** @see docs/01-界面文档.md §2.1 `draw.countdown` */
|
||||||
$schedule->command('lottery:hall-countdown')->everySecond();
|
if (config('lottery.realtime_hall_countdown', true)) {
|
||||||
|
$schedule->command('lottery:hall-countdown')->everySecond();
|
||||||
|
}
|
||||||
})
|
})
|
||||||
->create();
|
->create();
|
||||||
|
|||||||
@@ -48,9 +48,17 @@
|
|||||||
"npm run build"
|
"npm run build"
|
||||||
],
|
],
|
||||||
"dev": [
|
"dev": [
|
||||||
|
"Composer\\Config::disableProcessTimeout",
|
||||||
|
"npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#f472b6\" \"php artisan serve\" \"php artisan queue:listen --tries=1 --timeout=0\" \"php artisan pail --timeout=0\" \"npm run dev\" --names=server,queue,logs,vite --kill-others"
|
||||||
|
],
|
||||||
|
"dev:realtime": [
|
||||||
"Composer\\Config::disableProcessTimeout",
|
"Composer\\Config::disableProcessTimeout",
|
||||||
"npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74,#34d399,#f472b6\" \"php artisan serve\" \"php artisan queue:listen --tries=1 --timeout=0\" \"php artisan pail --timeout=0\" \"php artisan reverb:start\" \"php artisan schedule:work\" \"npm run dev\" --names=server,queue,logs,reverb,schedule,vite --kill-others"
|
"npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74,#34d399,#f472b6\" \"php artisan serve\" \"php artisan queue:listen --tries=1 --timeout=0\" \"php artisan pail --timeout=0\" \"php artisan reverb:start\" \"php artisan schedule:work\" \"npm run dev\" --names=server,queue,logs,reverb,schedule,vite --kill-others"
|
||||||
],
|
],
|
||||||
|
"dev:schedule": [
|
||||||
|
"Composer\\Config::disableProcessTimeout",
|
||||||
|
"php artisan schedule:work"
|
||||||
|
],
|
||||||
"test": [
|
"test": [
|
||||||
"@php artisan config:clear --ansi @no_additional_args",
|
"@php artisan config:clear --ansi @no_additional_args",
|
||||||
"@php artisan test"
|
"@php artisan test"
|
||||||
|
|||||||
Reference in New Issue
Block a user