-
@xevotech You cannot put in a systemd service file because the app is running in a container and the container itself has no systemd inside it.
Not an expert on laravel but there are two ways:
-
In the startup script, start the queue worker in the background - https://docs.cloudron.io/apps/lamp/#custom-startup-script . So,
sudo -u www-data /usr/bin/php /var/www/app/artisan queue:work --queue=high,standard,low --sleep=3 --tries=3 &
-
Alternately, you can put this in the crontab - https://docs.cloudron.io/apps/lamp/#cron-support . So,
0 * * * * sudo -u www-data /usr/bin/php /var/www/app/artisan queue:work --queue=high,standard,low --sleep=3 --tries=3 --stop-when-empty
(the stop-when-empty is needed so that the queue worker quits when the queue is empty).
Would either of the above work?
-
-
@girish I'm getting an error with LAMP's PHP.ini. Chaning the PHP.ini in the data dir doesn't fix it. What do I do?
The error as following:
May 07 22:10:38 PHP: syntax error, unexpected $end in /etc/php/7.4/cli/conf.d/99-cloudron.ini on line 5 May 07 22:10:38 May 07 22:10:38 ErrorException May 07 22:10:38 May 07 22:10:38 pcntl_async_signals() has been disabled for security reasons May 07 22:10:38 May 07 22:10:38 at /app/data/vendor/laravel/framework/src/Illuminate/Queue/Worker.php:639 May 07 22:10:38 635▕ * @return void May 07 22:10:38 636▕ */ May 07 22:10:38 637▕ protected function listenForSignals() May 07 22:10:38 638▕ { May 07 22:10:38 ➜ 639▕ pcntl_async_signals(true); May 07 22:10:38 640▕ May 07 22:10:38 641▕ pcntl_signal(SIGTERM, function () { May 07 22:10:38 642▕ $this->shouldQuit = true; May 07 22:10:38 643▕ }); May 07 22:10:38 May 07 22:10:38 +17 vendor frames May 07 22:10:38 18 /app/data/artisan:37 May 07 22:10:38 Illuminate\Foundation\Console\Kernel::handle() May 07 22:10:38 box:tasks 6710: {"percent":100,"message":"Done"} May 07 22:10:39 box:apptask xevoid.com updating app with values: {"installationState":"installed","error":null,"health":null} May 07 22:10:39 box:taskworker Task took 24.15 seconds May 07 22:10:39 box:tasks setCompleted - 6710: {"result":null,"error":null} May 07 22:10:39 box:tasks 6710: {"percent":100,"result":null,"error":null} May 07 22:10:43 ==> Do not override existing index file May 07 22:10:43 ==> Source custom startup script May 07 22:10:43 PHP: syntax error, unexpected $end in /etc/php/7.4/cli/conf.d/99-cloudron.ini on line 5 May 07 22:10:43