Skip to content

Commit 04cf99f

Browse files
committed
ICM: Strategies section example added.
1 parent fda6d3d commit 04cf99f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,16 @@ Overlapping can be prevented by various strategies:
4343

4444
Default `file` strategy is fine for a small applications, which are deployed on a single server.
4545
If your application is more complex and, for example, is deployed on a several nodes, then you probably would like to use some other mutex strategy.
46+
47+
You can change mutex strategy for your console command by specifying `$mutexStrategy` field:
48+
49+
```php
50+
class Foo extends Command
51+
{
52+
use WithoutOverlapping;
53+
54+
protected $mutexStrategy = 'mysql';
55+
56+
// ...
57+
}
58+
```

0 commit comments

Comments
 (0)