This commit is contained in:
root 2025-08-28 17:06:26 +08:00
parent 75ae9586b5
commit 29d96ccba4
2 changed files with 41 additions and 1 deletions

View File

@ -28,7 +28,8 @@
"firebase/php-jwt": "dev-main", "firebase/php-jwt": "dev-main",
"hashids/hashids": "5.0.x-dev", "hashids/hashids": "5.0.x-dev",
"phpmailer/phpmailer": "dev-master", "phpmailer/phpmailer": "dev-master",
"topthink/think-helper": "^3.1" "topthink/think-helper": "^3.1",
"topthink/think-worker": "5.0.x-dev"
}, },
"require-dev": { "require-dev": {
"topthink/think-dumper": "^1.0", "topthink/think-dumper": "^1.0",

39
config/worker.php Normal file
View File

@ -0,0 +1,39 @@
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\worker\websocket\Handler;
return [
'http' => [
'enable' => true,
'host' => '0.0.0.0',
'port' => 8080,
'worker_num' => 4,
'options' => [],
],
'websocket' => [
'enable' => false,
'handler' => Handler::class,
'ping_interval' => 25000,
'ping_timeout' => 60000,
],
//队列
'queue' => [
'enable' => false,
'workers' => [],
],
'hot_update' => [
'enable' => env('APP_DEBUG', false),
'name' => ['*.php'],
'include' => [app_path(), config_path(), root_path('route')],
'exclude' => [],
],
];