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;
|
||||
|
||||
use Hlgrrnhrdt\Resque\Console\WorkCommand;
|
||||
use Illuminate\Contracts\Foundation\Application;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Resque;
|
||||
|
||||
@ -24,24 +23,22 @@ class ResqueServiceProvider extends ServiceProvider
|
||||
$this->registerWorkCommand();
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected function registerManager()
|
||||
{
|
||||
$this->app->singleton('resque.manager', function (Application $app) {
|
||||
$config = $app['config']['resque.connection'];
|
||||
$this->app->singleton('resque.manager', function () {
|
||||
$config = $this->app['config']['resque.connection'];
|
||||
|
||||
$resque = new Resque();
|
||||
$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()
|
||||
{
|
||||
$this->app->singleton('command.resque.work', function (Application $app) {
|
||||
return new WorkCommand($app->make('resque.manager'));
|
||||
$this->app->singleton('command.resque.work', function () {
|
||||
return new WorkCommand($this->app->make('resque.manager'));
|
||||
});
|
||||
$this->commands('command.resque.work');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user