Do we still need the artisan queue by installing superivsor?
I see no warning in the on the webpage anymore
Hi,
Not sure I follow your question, if the queue is enabled then you would need to run something (supervisor or a cron) to process the jobs.
In the old versions, there was a performance warning when there was no supervisor installed that did run an artisan queue.
That is why I did this in my old install:
sudo apt-get install supervisor
cd /etc/supervisor/conf.d
cd /etc/supervisor/conf.d
sudo nano invoiceninja-worker.conf
[program:invoiceninja-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /usr/share/nginx/invoiceninja/artisan queue:work --sleep=3 --tries=3 --max-time=3600
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=www-data
numprocs=8
redirect_stderr=true
stdout_logfile=/var/log/invoiceninja-worker.log
stopwaitsecs=3600
cd /var/log
sudo touch invoiceninja-worker.log
sudo chown www-data:www-data invoiceninja-worker.log
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start invoiceninja-worker:*
sudo supervisorctl status
sudo nano /usr/share/nginx/invoiceninja/.env
QUEUE_CONNECTION=database
cd /usr/share/nginx/invoiceninja/
sudo -u www-data php artisan optimize
sudo -u www-data php artisan queue:restart
That warning is now gone when I did a fresh install. That is why I wonder if this is still in use or not.
I believe the warning just checks the queue setting in the .env file.
Sorry, I am not sure if I can follow, maybe I am misunderstanding how this works.
Here is how I understood it in the past:
You used to have two options.
1: Use crontab. Then you used to get a performance warning in the system check.
2. Use supervisor
Since v5, when I do a fresh install without supervisor and go with 1, this warning is no longer there. I wonder why.
For #1 it would depend on how the cron is configured.
If you only use schedule:run
you’ll see the warning, if you include queue:work
it should resolve the warning since the jobs are being processed.
hmmm…
If I follow the instructions of your manual Free Source Available Invoicing, Expenses & Time-Tracking | Invoice Ninja, I think I would only use schedule:run with crontab.
But I think I got a point of confusion. In my opinion, there is a header missing.
In the supervisor section, there is
That’s it! You should now have a functioning Supervisor setup for Invoice Ninja.
and then it continuous with:
If you are on shared hosting, it is possible to get the queues working by
I thought that even for shared hosting, supervisor is a requirement for that part, but it is more of an alternative for shared hosting env that don’t allow installing supervisor.
I made a pull for what I think makes it more clear (if I really understood it right)