File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Illuminated \Console ;
4+
5+ use RuntimeException ;
6+
7+ class MutexRuntimeException extends RuntimeException
8+ {
9+ }
Original file line number Diff line number Diff line change 22
33namespace Illuminated \Console ;
44
5- use RuntimeException ;
65use Symfony \Component \Console \Input \InputInterface ;
76use Symfony \Component \Console \Output \OutputInterface ;
87
@@ -19,15 +18,15 @@ protected function initializeMutex()
1918 {
2019 $ mutex = new Mutex ($ this );
2120 if (!$ mutex ->acquireLock ($ this ->getMutexTimeout ())) {
22- throw new RuntimeException ('Command is running now! ' );
21+ throw new MutexRuntimeException ('Command is running now! ' );
2322 }
2423
2524 register_shutdown_function ([$ this , 'releaseMutexLock ' ], $ mutex );
2625 }
2726
2827 public function getMutexStrategy ()
2928 {
30- return ( property_exists ($ this , 'mutexStrategy ' ) ? $ this ->mutexStrategy : 'file ' ) ;
29+ return property_exists ($ this , 'mutexStrategy ' ) ? $ this ->mutexStrategy : 'file ' ;
3130 }
3231
3332 public function setMutexStrategy ($ strategy )
@@ -37,7 +36,7 @@ public function setMutexStrategy($strategy)
3736
3837 public function getMutexTimeout ()
3938 {
40- return ( property_exists ($ this , 'mutexTimeout ' ) ? $ this ->mutexTimeout : 0 ) ;
39+ return property_exists ($ this , 'mutexTimeout ' ) ? $ this ->mutexTimeout : 0 ;
4140 }
4241
4342 public function setMutexTimeout ($ timeout )
You can’t perform that action at this time.
0 commit comments