Skip to content

Commit

Permalink
fixed: 完善test的配置文件
Browse files Browse the repository at this point in the history
  • Loading branch information
bingcool committed Jul 3, 2023
1 parent 6cfd4e4 commit 2a71406
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,8 @@ return [
// 适配swoole的mysql客户端组件
'db' => function() {
$config = [
// 类型
'type' => 'mysql',
// 地址
'hostname' => '127.0.0.1',
// 数据库
Expand Down
5 changes: 4 additions & 1 deletion Test/Config/dc-dev.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

use PhpAmqpLib\Connection\AMQPConnectionConfig;
use Test\Config\AmqpConfig;
use Swoolefy\Core\SystemEnv;

return [

'mysql_db' => [
// 类型
'type' => 'mysql',
// 服务器地址
'hostname' => '127.0.0.1',
// 数据库名
Expand Down Expand Up @@ -33,7 +36,7 @@
// sql执行日志条目设置,不能设置太大,适合调试使用,设置为0则不使用
'spend_log_limit' => 30,
// 是否开启dubug
'debug' => 1
'debug' => SystemEnv::isPrdEnv() ? 0 : 1
],

'predis' => [
Expand Down
6 changes: 5 additions & 1 deletion Test/Config/dc-gra.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
<?php

use Swoolefy\Core\SystemEnv;

return [

'mysql_db' => [
// 类型
'type' => 'mysql',
// 服务器地址
'hostname' => '127.0.0.1',
// 数据库名
Expand Down Expand Up @@ -30,7 +34,7 @@
// sql执行日志条目设置,不能设置太大,适合调试使用,设置为0,则不使用
'spend_log_limit' => 30,
// 是否开启dubug
'debug' => 1
'debug' => SystemEnv::isPrdEnv() ? 0 : 1
],

'predis' => [
Expand Down
6 changes: 5 additions & 1 deletion Test/Config/dc-prd.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
<?php

use Swoolefy\Core\SystemEnv;

return [

'mysql_db' => [
// 类型
'type' => 'mysql',
// 服务器地址
'hostname' => '127.0.0.1',
// 数据库名
Expand Down Expand Up @@ -30,7 +34,7 @@
// sql执行日志条目设置,不能设置太大,适合调试使用,设置为0,则不使用
'spend_log_limit' => 30,
// 是否开启dubug
'debug' => 1
'debug' => SystemEnv::isPrdEnv() ? 0 : 1
],

'predis' => [
Expand Down
6 changes: 5 additions & 1 deletion Test/Config/dc-test.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
<?php

use Swoolefy\Core\SystemEnv;

return [

'mysql_db' => [
// 类型
'type' => 'mysql',
// 服务器地址
'hostname' => '127.0.0.1',
// 数据库名
Expand Down Expand Up @@ -30,7 +34,7 @@
// sql执行日志条目设置,不能设置太大,适合调试使用,设置为0,则不使用
'spend_log_limit' => 30,
// 是否开启dubug
'debug' => 1
'debug' => SystemEnv::isPrdEnv() ? 0 : 1
],

'predis' => [
Expand Down

0 comments on commit 2a71406

Please sign in to comment.