diff --git a/src/ResqueServiceProvider.php b/src/ResqueServiceProvider.php index b9e839d..9d7a81f 100644 --- a/src/ResqueServiceProvider.php +++ b/src/ResqueServiceProvider.php @@ -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'); }