REAPI/config/worker.php

52 lines
2.0 KiB
PHP
Raw Normal View History

2024-09-29 15:43:18 +08:00
<?php
// +----------------------------------------------------------------------
// | Worker Plugin for ThinkAdmin
// +----------------------------------------------------------------------
2024-12-04 12:33:47 +08:00
// | 版权所有 2014~2024 ThinkAdmin [ thinkadmin.top ]
2024-09-29 15:43:18 +08:00
// +----------------------------------------------------------------------
// | 官方网站: https://thinkadmin.top
// +----------------------------------------------------------------------
// | 免责声明 ( https://thinkadmin.top/disclaimer )
// | 开源协议 ( http://www.apache.org/licenses/LICENSE-2.0 )
// | 配置参考 ( https://www.workerman.net/doc/workerman/worker/properties.html )
// +----------------------------------------------------------------------
// | gitee 代码仓库https://gitee.com/zoujingli/think-plugs-worker
// | github 代码仓库https://github.com/zoujingli/think-plugs-worker
// +----------------------------------------------------------------------
// | 配置参数参数https://www.workerman.net/doc/workerman/worker/properties.html
// +----------------------------------------------------------------------
return [
// 服务监听地址
2024-12-04 12:33:47 +08:00
'host' => '127.0.0.1',
2024-09-29 15:43:18 +08:00
// 服务监听端口
2024-12-04 12:33:47 +08:00
'port' => 2347,
2024-09-29 15:43:18 +08:00
// 套接字上下文选项
2024-12-04 12:33:47 +08:00
'context' => [],
2024-09-29 15:43:18 +08:00
// 高级自定义服务类
2024-12-04 12:33:47 +08:00
'classes' => '',
2024-09-29 15:43:18 +08:00
// 消息请求回调处理
'callable' => null,
// 服务进程参数配置
2024-12-04 12:33:47 +08:00
'worker' => [
'name' => 'REAPI',
2024-09-29 15:43:18 +08:00
'count' => 8,
],
2024-12-04 12:33:47 +08:00
// 监控文件变更重载,仅 Debug 模式有效
'files' => [
2024-09-29 15:43:18 +08:00
// 监控检测间隔(单位秒,零不监控)
'time' => 3,
2024-12-04 12:33:47 +08:00
// 文件监控目录(默认监控 app+config 目录)
2024-09-29 15:43:18 +08:00
'path' => [],
// 文件监控后缀(默认监控 所有 文件)
'exts' => ['*']
],
2024-12-04 12:33:47 +08:00
// 监控内存超限重载,仅 Debug 模式有效
'memory' => [
2024-09-29 15:43:18 +08:00
// 监控检测间隔(单位秒,零不监控)
2024-12-04 12:33:47 +08:00
'time' => 60,
2024-09-29 15:43:18 +08:00
// 限制内存大小(可选单位有 G M K
2024-12-04 12:33:47 +08:00
'limit' => '3G'
2024-09-29 15:43:18 +08:00
],
];