Skip to content

Commit 909374f

Browse files
committed
updated readme
1 parent af82d44 commit 909374f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

readme.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ $ composer require jdavidbakr/multi-server-event
1717

1818
The new event structure uses a database table to track which server is currently executing an event. You must create the database table using the provided migration. To do this, add the following to the $commands array in \App\Console\Kernel.php:
1919

20-
```
20+
```php
2121
\jdavidbakr\MultiServerEvent\Commands\MultiServerMigrationService::class,
2222
```
2323

@@ -30,30 +30,30 @@ php artisan migrate
3030

3131
Now we want to change the default schedule IoC to use this alternate one. In app\Console\Kernel.php add the following function:
3232

33-
```
33+
```php
3434
/**
3535
* Define the application's command schedule.
3636
*
3737
* @return void
3838
*/
3939
protected function defineConsoleSchedule()
4040
{
41-
$this->app->instance(
42-
'Illuminate\Console\Scheduling\Schedule', $schedule = new \jdavidbakr\MultiServerEvent\Scheduling\Schedule
43-
);
41+
$this->app->instance(
42+
'Illuminate\Console\Scheduling\Schedule', $schedule = new \jdavidbakr\MultiServerEvent\Scheduling\Schedule
43+
);
4444

45-
$this->schedule($schedule);
45+
$this->schedule($schedule);
4646
}
4747
```
4848

4949
## Usage
5050

5151
When composing your schedule, simply add "withoutOverlappingMultiServer()" to the command, i.e.
5252

53-
```
53+
```php
5454
$schedule->command('inspire')
55-
->daily()
56-
->withoutOverlappingMultiServer();
55+
->daily()
56+
->withoutOverlappingMultiServer();
5757
```
5858

5959
This will prevent multiple servers from executing the same event at the same time.

0 commit comments

Comments
 (0)