We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
mysql
1 parent caf3581 commit 7a68e0cCopy full SHA for 7a68e0c
src/Mutex.php
@@ -4,6 +4,7 @@
4
5
use Illuminate\Console\Command;
6
use NinjaMutex\Lock\FlockLock;
7
+use NinjaMutex\Lock\MySqlLock;
8
use NinjaMutex\Mutex as Ninja;
9
use NinjaMutex\MutexException;
10
@@ -28,7 +29,7 @@ private function strategy()
28
29
30
switch ($this->command->getMutexStrategy()) {
31
case 'mysql':
- throw new MutexException('Strategy `mysql` is not implemented yet.');
32
+ return new MySqlLock(env('DB_USERNAME'), env('DB_PASSWORD'), env('DB_HOST'));
33
34
case 'redis':
35
throw new MutexException('Strategy `redis` is not implemented yet.');
0 commit comments