File tree 1 file changed +2
-12
lines changed
1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change 8
8
use NinjaMutex \Lock \FlockLock ;
9
9
use NinjaMutex \Lock \MemcachedLock ;
10
10
use NinjaMutex \Lock \MySqlLock ;
11
- use NinjaMutex \Lock \PhpRedisLock ;
12
11
use NinjaMutex \Lock \PredisRedisLock ;
13
12
use NinjaMutex \Mutex as Ninja ;
14
13
@@ -41,7 +40,7 @@ public function getStrategy()
41
40
);
42
41
43
42
case 'redis ' :
44
- return $ this ->getRedisLock (config ( ' database.redis.client ' , ' predis ' ) );
43
+ return $ this ->getRedisLock ();
45
44
46
45
case 'memcached ' :
47
46
return new MemcachedLock (Cache::getStore ()->getMemcached ());
@@ -52,20 +51,11 @@ public function getStrategy()
52
51
}
53
52
}
54
53
55
- private function getRedisLock ($ client )
54
+ private function getRedisLock ()
56
55
{
57
- if ($ client === 'phpredis ' ) {
58
- return new PhpRedisLock ($ this ->getPhpRedisClient ());
59
- }
60
-
61
56
return new PredisRedisLock ($ this ->getPredisClient ());
62
57
}
63
58
64
- public function getPhpRedisClient ()
65
- {
66
- return RedisFacade::connection ()->client ();
67
- }
68
-
69
59
public function getPredisClient ()
70
60
{
71
61
return RedisFacade::connection ();
You can’t perform that action at this time.
0 commit comments