Skip to content

Commit

Permalink
bugs fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
kovey committed Jul 5, 2021
1 parent 9606520 commit f9ba1e3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
14 changes: 12 additions & 2 deletions src/Pool/Mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ class Mysql extends Base
*/
const POOL_NAME = 'pool_mysql';

/**
* @description pool name write
*/
const POOL_NAME_WRITE = 'pool_mysql_write';

/**
* @description pool name read
*/
const POOL_NAME_READ = 'pool_mysql_read';

/**
* @description init connection
*
Expand All @@ -45,7 +55,7 @@ protected function initConnection() : DbInterface | RedisInterface | bool
*/
public static function getWriteName() : string
{
return self::POOL_NAME . '_write';
return self::POOL_NAME_WRITE;
}

/**
Expand All @@ -55,6 +65,6 @@ public static function getWriteName() : string
*/
public static function getReadName() : string
{
return self::POOL_NAME . '_read';
return self::POOL_NAME_READ;
}
}
15 changes: 13 additions & 2 deletions src/Pool/Redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,18 @@ class Redis extends Base
* @var string
*/
const POOL_NAME = 'pool_redis';


/**
* @description pool name write
*/
const POOL_NAME_WRITE = 'pool_redis_write';

/**
* @description pool name read
*/
const POOL_NAME_READ = 'pool_redis_read';

/**
* @description init connection
*
Expand All @@ -47,7 +58,7 @@ protected function initConnection() : DbInterface | RedisInterface | bool
*/
public static function getWriteName() : string
{
return self::POOL_NAME . '_write';
return self::POOL_NAME_WRITE;
}

/**
Expand All @@ -57,6 +68,6 @@ public static function getWriteName() : string
*/
public static function getReadName() : string
{
return self::POOL_NAME . '_read';
return self::POOL_NAME_READ;
}
}

0 comments on commit f9ba1e3

Please sign in to comment.