Skip to content

Commit

Permalink
Fix schedule commands (laravel#1225)
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints authored Feb 22, 2022
1 parent ae194ec commit 67fa96d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/Console/ConsoleServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ class ConsoleServiceProvider extends ServiceProvider
'QueueWork' => 'command.queue.work',
'Seed' => 'command.seed',
'Wipe' => 'command.wipe',
'ScheduleFinish' => ScheduleFinishCommand::class,
'ScheduleRun' => ScheduleRunCommand::class,
'ScheduleFinish' => 'command.schedule.finish',
'ScheduleRun' => 'command.schedule.run',
'SchemaDump' => 'command.schema.dump',
];

Expand Down Expand Up @@ -419,7 +419,9 @@ protected function registerWipeCommand()
*/
protected function registerScheduleFinishCommand()
{
$this->app->singleton(ScheduleFinishCommand::class);
$this->app->singleton('command.schedule.finish', function () {
return new ScheduleFinishCommand;
});
}

/**
Expand All @@ -429,7 +431,9 @@ protected function registerScheduleFinishCommand()
*/
protected function registerScheduleRunCommand()
{
$this->app->singleton(ScheduleRunCommand::class);
$this->app->singleton('command.schedule.run', function () {
return new ScheduleRunCommand;
});
}

/**
Expand Down

0 comments on commit 67fa96d

Please sign in to comment.