mirror of
https://github.com/idanoo/laravel-resque.git
synced 2024-11-23 08:55:21 +00:00
remove Application type hinting
This commit is contained in:
parent
c2e8486494
commit
02f2712fab
@ -2,7 +2,6 @@
|
|||||||
namespace Hlgrrnhrdt\Resque;
|
namespace Hlgrrnhrdt\Resque;
|
||||||
|
|
||||||
use Hlgrrnhrdt\Resque\Console\WorkCommand;
|
use Hlgrrnhrdt\Resque\Console\WorkCommand;
|
||||||
use Illuminate\Contracts\Foundation\Application;
|
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use Resque;
|
use Resque;
|
||||||
|
|
||||||
@ -24,24 +23,22 @@ class ResqueServiceProvider extends ServiceProvider
|
|||||||
$this->registerWorkCommand();
|
$this->registerWorkCommand();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected function registerManager()
|
protected function registerManager()
|
||||||
{
|
{
|
||||||
$this->app->singleton('resque.manager', function (Application $app) {
|
$this->app->singleton('resque.manager', function () {
|
||||||
$config = $app['config']['resque.connection'];
|
$config = $this->app['config']['resque.connection'];
|
||||||
|
|
||||||
$resque = new Resque();
|
$resque = new Resque();
|
||||||
$resque->setBackend(implode(':', [$config['host'], $config['port']]), $config['db']);
|
$resque->setBackend(implode(':', [$config['host'], $config['port']]), $config['db']);
|
||||||
|
|
||||||
return new ResqueManager($resque, $app['config']['resque.trackStatus']);
|
return new ResqueManager($resque, $this->app['config']['resque.trackStatus']);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function registerWorkCommand()
|
protected function registerWorkCommand()
|
||||||
{
|
{
|
||||||
$this->app->singleton('command.resque.work', function (Application $app) {
|
$this->app->singleton('command.resque.work', function () {
|
||||||
return new WorkCommand($app->make('resque.manager'));
|
return new WorkCommand($this->app->make('resque.manager'));
|
||||||
});
|
});
|
||||||
$this->commands('command.resque.work');
|
$this->commands('command.resque.work');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user