tapi/config/worker.php
2025-08-28 17:06:26 +08:00

40 lines
1.3 KiB
PHP

<?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' => [],
],
];