File tree Expand file tree Collapse file tree 1 file changed +5
-22
lines changed
Expand file tree Collapse file tree 1 file changed +5
-22
lines changed Original file line number Diff line number Diff line change @@ -46,41 +46,27 @@ But if your application is deployed on a several nodes, which can run artisan co
4646You can change strategy in your console command class, by specifying `$overlappingStrategy` field:
4747
4848```php
49- namespace App\Console\Commands;
50-
51- use Illuminate\Console\Command;
52- use Illuminated\Console\WithoutOverlapping;
53-
5449class Foo extends Command
5550{
5651 use WithoutOverlapping;
5752
58- protected $signature = ' foo ' ;
59- protected $description = ' Some dummy command ' ;
53+ // ...
54+
6055 protected $overlappingStrategy = ' database' ;
6156
62- public function handle()
63- {
64- $this->info(' Foo! Bar! Baz! ' );
65- }
57+ // ...
6658}
6759
6860```
6961
7062Or by using `setOverlappingStrategy()` method:
7163
7264```php
73- namespace App\Console\Commands;
74-
75- use Illuminate\Console\Command;
76- use Illuminated\Console\WithoutOverlapping;
77-
7865class Foo extends Command
7966{
8067 use WithoutOverlapping;
8168
82- protected $signature = ' foo' ;
83- protected $description = ' Some dummy command' ;
69+ // ...
8470
8571 public function __construct()
8672 {
@@ -90,9 +76,6 @@ class Foo extends Command
9076 $this->setOverlappingStrategy($strategy);
9177 }
9278
93- public function handle()
94- {
95- $this->info(' Foo! Bar! Baz! ' );
96- }
79+ // ...
9780}
9881```
You can’t perform that action at this time.
0 commit comments