File tree Expand file tree Collapse file tree 1 file changed +0
-41
lines changed Expand file tree Collapse file tree 1 file changed +0
-41
lines changed Original file line number Diff line number Diff line change @@ -38,44 +38,3 @@ Prevents overlapping for artisan console commands.
38
38
` ` `
39
39
40
40
# # Strategies
41
-
42
- Overlapping can be prevented by various strategies. ` file` by default, strategy should be chosen according to your context.
43
- If your application is deployed on a single server, then using defaults is okay. Just use trait, and that' s it.
44
- But if your application is deployed on a several nodes, which can run artisan commands, then you should use `database` strategy.
45
-
46
- You can change strategy in your console command class, by specifying `$overlappingStrategy` field:
47
-
48
- ```php
49
- class Foo extends Command
50
- {
51
- use WithoutOverlapping;
52
-
53
- // ...
54
-
55
- protected $overlappingStrategy = ' database' ;
56
-
57
- // ...
58
- }
59
-
60
- ```
61
-
62
- Or by using `setOverlappingStrategy()` method:
63
-
64
- ```php
65
- class Foo extends Command
66
- {
67
- use WithoutOverlapping;
68
-
69
- // ...
70
-
71
- public function __construct()
72
- {
73
- parent::__construct();
74
-
75
- $strategy = config(' foo.overlapping' );
76
- $this->setOverlappingStrategy($strategy);
77
- }
78
-
79
- // ...
80
- }
81
- ```
You can’t perform that action at this time.
0 commit comments