FoxxMD / laravel-elasticbeanstalk-queue-worker

MIT License
52 stars 13 forks source link

My queue is not being processed #10

Closed kakapa closed 6 years ago

kakapa commented 6 years ago

I have installed the plugin according to instructions. Started with composer, then config/app followed by artisan vendor publish. I added the 3 EB variables IS_WORKER=true, QUEUE_DRIVER=sqs, queueMyemails=myemails.

Uploaded my app and I see no sign of whether the supervisor is setup, working or any errors. It's just quiet. The queue is configured properly and can be manually processed via php artisan queue:listen on my local environment.

FoxxMD commented 6 years ago

Did you do any troubleshooting on the ec2 instance? Things to check for on the instance:

After changing environmental variables on elasticbeanstalk the application needs to be redeployed so that the eb script writes the updated set of variables for supervisor to use for the laravel environment and also so it can configure itself.

Additionally you can run php /var/app/current/artisan queue:restart to restart any queues running in daemon mode

goldnetonline commented 6 years ago

Hello there,

After following all the steps, it still did not work for me.

No error in installation process of /var/log/eb-activity.log

Supervisord status says FATAL Exited too quickly (process log may have details)

Nothing like /var/log/supervisor

Then laravel log says

There are no commands defined in the "doctrine:queue" namespace. {"exception":"[object] (Symfony\\Component\\Console\\Exception\\NamespaceNotFoundException(code: 0): There are no commands defined in the \"doctrine:queue\" namespace. at /var/app/current/vendor/symfony/console/Application.php:578)

When I run php artisan queue:work manually, it works.

php /var/app/current/artisan queue:restart gave the same error.

I think it has to do with the command sent to Laravel

Please help

goldnetonline commented 6 years ago

A quick fix as at Monday July 2 2018 for anyone having issues on this beautiful work.

The error is on parseConfig.php inside the .ebextensions directory.

on line 8 please change command=sudo php artisan doctrine:queue:work $connection --queue=$queue --tries=$tries --sleep=$sleep --delay=$delay --daemon

to

command=sudo php artisan queue:work $connection --queue=$queue --tries=$tries --sleep=$sleep --delay=$delay --daemon

You and I know that as of Laravel 5.4+ there is nothing like doctrine:queue.

Hope this helps someone.

FoxxMD commented 6 years ago

You are absolutely right @goldnetonline, I was using SafeQueue during development in another project and forgot to change it back to the generic name after publishing this package. Thanks for finding this oversight!