Skip to content

Commit c190e59

Browse files
plourdedDominic Plourde
andauthored
[9.x] Merge 8.x into 9.x (#1245)
* Add missing clear queue command to service provider (#1237) * Add missing clear queue command to service porovider * hotfix: change order of uses to respect ci Co-authored-by: Dominic Plourde <[email protected]> * Add missing Schedule:work command (#1243) Co-authored-by: Dominic Plourde <[email protected]> Co-authored-by: Dominic Plourde <[email protected]>
1 parent 5b2a6cf commit c190e59

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

src/Console/ConsoleServiceProvider.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Illuminate\Cache\Console\ForgetCommand as CacheForgetCommand;
99
use Illuminate\Console\Scheduling\ScheduleFinishCommand;
1010
use Illuminate\Console\Scheduling\ScheduleRunCommand;
11+
use Illuminate\Console\Scheduling\ScheduleWorkCommand;
1112
use Illuminate\Database\Console\DumpCommand;
1213
use Illuminate\Database\Console\Migrations\FreshCommand as MigrateFreshCommand;
1314
use Illuminate\Database\Console\Migrations\InstallCommand as MigrateInstallCommand;
@@ -21,6 +22,7 @@
2122
use Illuminate\Database\Console\Seeds\SeederMakeCommand;
2223
use Illuminate\Database\Console\WipeCommand;
2324
use Illuminate\Queue\Console\BatchesTableCommand;
25+
use Illuminate\Queue\Console\ClearCommand as ClearQueueCommand;
2426
use Illuminate\Queue\Console\FailedTableCommand;
2527
use Illuminate\Queue\Console\FlushFailedCommand as FlushFailedQueueCommand;
2628
use Illuminate\Queue\Console\ForgetFailedCommand as ForgetFailedQueueCommand;
@@ -50,6 +52,7 @@ class ConsoleServiceProvider extends ServiceProvider
5052
'MigrateReset' => 'command.migrate.reset',
5153
'MigrateRollback' => 'command.migrate.rollback',
5254
'MigrateStatus' => 'command.migrate.status',
55+
'QueueClear' => 'command.queue.clear',
5356
'QueueFailed' => 'command.queue.failed',
5457
'QueueFlush' => 'command.queue.flush',
5558
'QueueForget' => 'command.queue.forget',
@@ -61,6 +64,7 @@ class ConsoleServiceProvider extends ServiceProvider
6164
'Wipe' => 'command.wipe',
6265
'ScheduleFinish' => 'command.schedule.finish',
6366
'ScheduleRun' => 'command.schedule.run',
67+
'ScheduleWork' => 'command.schedule.work',
6468
'SchemaDump' => 'command.schema.dump',
6569
];
6670

@@ -256,6 +260,18 @@ protected function registerMigrateStatusCommand()
256260
});
257261
}
258262

263+
/**
264+
* Register the command.
265+
*
266+
* @return void
267+
*/
268+
protected function registerQueueClearCommand()
269+
{
270+
$this->app->singleton('command.queue.clear', function () {
271+
return new ClearQueueCommand;
272+
});
273+
}
274+
259275
/**
260276
* Register the command.
261277
*
@@ -436,6 +452,18 @@ protected function registerScheduleRunCommand()
436452
});
437453
}
438454

455+
/**
456+
* Register the command.
457+
*
458+
* @return void
459+
*/
460+
protected function registerScheduleWorkCommand()
461+
{
462+
$this->app->singleton('command.schedule.work', function () {
463+
return new ScheduleWorkCommand;
464+
});
465+
}
466+
439467
/**
440468
* Register the command.
441469
*

0 commit comments

Comments
 (0)