mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-02 14:25:38 +08:00
initial 2.0.0-a4 commit
This commit is contained in:
@@ -27,20 +27,20 @@ $config['crash_dir'] = $config['zm_data'] . 'crash/';
|
||||
/** 对应swoole的server->set参数 */
|
||||
$config['swoole'] = [
|
||||
'log_file' => $config['crash_dir'] . 'swoole_error.log',
|
||||
'worker_num' => 8,
|
||||
'worker_num' => swoole_cpu_num(),
|
||||
'dispatch_mode' => 2,
|
||||
'max_coroutine' => 30000,
|
||||
'max_coroutine' => 300000,
|
||||
//'task_worker_num' => 4,
|
||||
//'task_enable_coroutine' => true
|
||||
];
|
||||
|
||||
/** 轻量字符串缓存,默认开启 */
|
||||
$config['light_cache'] = [
|
||||
"status" => true,
|
||||
"size" => 2048, //最多允许储存的条数(需要2的倍数)
|
||||
"max_strlen" => 4096, //单行字符串最大长度(需要2的倍数)
|
||||
"size" => 1024, //最多允许储存的条数(需要2的倍数)
|
||||
"max_strlen" => 8192, //单行字符串最大长度(需要2的倍数)
|
||||
"hash_conflict_proportion" => 0.6, //Hash冲突率(越大越好,但是需要的内存更多)
|
||||
"persistence_path" => $config['zm_data']."_cache.json"
|
||||
"persistence_path" => $config['zm_data']."_cache.json",
|
||||
'auto_save_interval' => 900
|
||||
];
|
||||
|
||||
/** MySQL数据库连接信息,host留空则启动时不创建sql连接池 */
|
||||
@@ -60,8 +60,17 @@ $config['sql_config'] = [
|
||||
'sql_default_fetch_mode' => PDO::FETCH_ASSOC // added in 1.5.6
|
||||
];
|
||||
|
||||
/** CQHTTP连接约定的token */
|
||||
$config["access_token"] = "";
|
||||
/** Redis连接信息,host留空则启动时不创建Redis连接池 */
|
||||
$config['redis_config'] = [
|
||||
'host' => '',
|
||||
'port' => 6379,
|
||||
'timeout' => 1,
|
||||
'db_index' => 0,
|
||||
'auth' => ''
|
||||
];
|
||||
|
||||
/** onebot连接约定的token */
|
||||
$config["access_token"] = '';
|
||||
|
||||
/** HTTP服务器固定请求头的返回 */
|
||||
$config['http_header'] = [
|
||||
@@ -82,9 +91,6 @@ $config['init_atomics'] = [
|
||||
/** 终端日志显示等级(0-4) */
|
||||
$config["info_level"] = 2;
|
||||
|
||||
/** 自动保存计时器的缓存保存时间(秒) */
|
||||
$config['auto_save_interval'] = 900;
|
||||
|
||||
/** 上下文接口类 implemented from ContextInterface */
|
||||
$config['context_class'] = \ZM\Context\Context::class;
|
||||
|
||||
@@ -108,7 +114,7 @@ $config['command_register_class'] = [
|
||||
];
|
||||
|
||||
/** 服务器启用的外部第三方和内部插件 */
|
||||
$config['plugins'] = [
|
||||
$config['modules'] = [
|
||||
'qqbot' => true, // QQ机器人事件解析器,如果取消此项则默认为 true 开启状态,否则你手动填写 false 才会关闭
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user