forked from doppar/queue
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQueueServiceProvider.php
More file actions
48 lines (42 loc) · 1.19 KB
/
QueueServiceProvider.php
File metadata and controls
48 lines (42 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
namespace Doppar\Queue;
use Doppar\Queue\Commands\MakeJobCommand;
use Phaseolies\Providers\ServiceProvider;
use Doppar\Queue\QueueManager;
use Doppar\Queue\Commands\QueueRunCommand;
use Doppar\Queue\Commands\QueueRetryCommand;
use Doppar\Queue\Commands\QueueFlushCommand;
use Doppar\Queue\Commands\QueueFailedCommand;
use Doppar\Queue\Commands\QueueMonitorCommand;
class QueueServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register(): void
{
$this->app->singleton('queue.worker', QueueManager::class);
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot(): void
{
$this->loadMigrations(__DIR__ . '/database/migrations');
$this->publishes([
__DIR__ . '/database/migrations' => database_path('migrations'),
], 'migrations');
$this->commands([
QueueRunCommand::class,
QueueRetryCommand::class,
QueueFlushCommand::class,
QueueFailedCommand::class,
QueueMonitorCommand::class,
MakeJobCommand::class
]);
}
}