orobogenius / sansdaemon

Batch process Laravel Queue without a daemon; Processes queue jobs and kills the process
https://medium.com/@orobogenius/laravel-queue-processing-on-shared-hosting-dedd82d0267a
MIT License
176 stars 17 forks source link

The "--sansdaemon" option does not exist. #6

Closed nickinguel closed 5 years ago

nickinguel commented 5 years ago

After a fresh installation of this package, I typed in the terminal the recommended command php artisan queue:work --sansdaemon as said in the README, but I constantly got the following error :

The "--sansdaemon" option does not exist.

orobogenius commented 5 years ago

@cfass I can confirm that the command is working. After installation, once laravel auto-discovers the package, it'll work. If you're not using laravel 5.5 and above, you should add the service provider Queueworker\SansDaemon\SansDaemonServiceProvider::class to your config/app.php file.

It won't also hurt to run composer dump-autoload.

nickinguel commented 5 years ago

Sure I do use Laravel 5.5 but let me retry it after the composer dump-autoload. I'll be back.

nickinguel commented 5 years ago

It still doesn't work after composer dump-autoload. Have you ever tried on a different computer than yours?

nickinguel commented 5 years ago

I kind of "found" what was causing the problem. It is a kind of incompatibility with the Bugsnag library Service provider app presence in the app.php mentionned in the Bugsnag installation process doc.

When we remove Bugsnag service provider inclusion from the config/app.php (Bugsnag\BugsnagLaravel\BugsnagServiceProvider::class), everything goes the right way : I mean, the php artisan queue:work --sansdaemon works properly but adding it back cause the same problem again.

I attached the BugsnagServiceProvider php file, so you can check for it to figure out what is causing incompatibility. Thank you.

BugsnagServiceProvider.php.txt

orobogenius commented 5 years ago

@cfass Thanks for bringing up the issue with Bugsnag, this definitely helped me narrow down the problem. I've fixed the issue and made a new release, you may now run composer update and use the package as normal.