You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ Prevents overlapping for Laravel console commands.
45
45
```php
46
46
use Illuminated\Console\WithoutOverlapping;
47
47
48
-
class MyProtectedCommand extends Command
48
+
class ExampleCommand extends Command
49
49
{
50
50
use WithoutOverlapping;
51
51
@@ -68,7 +68,7 @@ If your application is more complex and, for example, is deployed on a several n
68
68
You can change mutex strategy by specifying `$mutexStrategy` field:
69
69
70
70
```php
71
-
class MyProtectedCommand extends Command
71
+
class ExampleCommand extends Command
72
72
{
73
73
use WithoutOverlapping;
74
74
@@ -81,7 +81,7 @@ class MyProtectedCommand extends Command
81
81
Or by using `setMutexStrategy` method:
82
82
83
83
```php
84
-
class MyProtectedCommand extends Command
84
+
class ExampleCommand extends Command
85
85
{
86
86
use WithoutOverlapping;
87
87
@@ -106,7 +106,7 @@ timeout for a mutex, so it can wait for another command to finish it's execution
106
106
You can change mutex timeout by specifying `$mutexTimeout` field:
107
107
108
108
```php
109
-
class MyProtectedCommand extends Command
109
+
class ExampleCommand extends Command
110
110
{
111
111
use WithoutOverlapping;
112
112
@@ -119,7 +119,7 @@ class MyProtectedCommand extends Command
119
119
Or by using `setMutexTimeout` method:
120
120
121
121
```php
122
-
class MyProtectedCommand extends Command
122
+
class ExampleCommand extends Command
123
123
{
124
124
use WithoutOverlapping;
125
125
@@ -146,7 +146,7 @@ Sometimes it is useful to set common mutex for a several commands. You can easil
146
146
By default, mutex name is generated based on a command's name and arguments. To change this, just override `getMutexName` method in your command:
147
147
148
148
```php
149
-
class MyProtectedCommand extends Command
149
+
class ExampleCommand extends Command
150
150
{
151
151
use WithoutOverlapping;
152
152
@@ -180,7 +180,7 @@ trait WithoutOverlapping
180
180
If your command is overriding `initialize` method too, then you should call `initializeMutex` method by yourself:
181
181
182
182
```php
183
-
class MyProtectedCommand extends Command
183
+
class ExampleCommand extends Command
184
184
{
185
185
use WithoutOverlapping;
186
186
@@ -203,7 +203,7 @@ If you're using some other cool `illuminated/console-%` packages, well, then you
203
203
For example, if you're trying to build [loggable command](https://github.com/dmitry-ivanov/laravel-console-logger), which is protected against overlapping:
204
204
205
205
```php
206
-
class MyProtectedCommand extends Command
206
+
class ExampleCommand extends Command
207
207
{
208
208
use Loggable;
209
209
use WithoutOverlapping;
@@ -218,7 +218,7 @@ You'll get fatal error, the "traits conflict", because both of these traits are
218
218
But don't worry, solution is very simple. Override `initialize` method by yourself, and initialize traits in required order:
0 commit comments