WokerTask/app/common/logic/RedisLogic.php

16 lines
355 B
PHP

<?php
namespace app\common\logic;
class RedisLogic extends BaseLogic
{
public static function getInstance()
{
$redisInstance = new \Redis();
$redisInstance->connect(env('redis.host'));
if (env('redis.auth', '') != '') {
$redisInstance->auth(env('redis.auth'));
}
return $redisInstance;
}
}