Changed queue worker
Some checks failed
Push image to registry / build-image (push) Failing after 7m39s
Some checks failed
Push image to registry / build-image (push) Failing after 7m39s
This commit is contained in:
@ -52,7 +52,8 @@ RUN apk update && apk add --no-cache \
|
||||
supervisor \
|
||||
nginx \
|
||||
openssl \
|
||||
linux-headers
|
||||
linux-headers \
|
||||
supervisor
|
||||
|
||||
RUN docker-php-ext-configure zip && docker-php-ext-install zip
|
||||
RUN docker-php-ext-install gd pdo pdo_mysql zip
|
||||
@ -75,6 +76,10 @@ RUN mv ${APP_ENV_FILE} .env
|
||||
|
||||
RUN composer install --no-interaction --prefer-dist
|
||||
|
||||
# Supervisor
|
||||
COPY ./docker/datbrowserQueueWorker.conf /etc/supervisor/conf.d/datbrowserQueueWorker.conf
|
||||
RUN sudo supervisorctl reread && sudo supervisorctl reread && sudo supervisorctl update
|
||||
|
||||
# CRON
|
||||
RUN echo "* * * * * cd ${wd} && php artisan schedule:run >> /dev/null 2>&1" > /etc/crontabs/root
|
||||
|
||||
|
@ -28,7 +28,7 @@ abstract class BrowserJob implements ShouldQueue
|
||||
|
||||
public int $jobId;
|
||||
|
||||
public $timeout = 300;
|
||||
public $timeout = 500;
|
||||
|
||||
public function __construct(int $jobId)
|
||||
{
|
||||
|
12
docker/datbrowserQueueWorker.conf
Normal file
12
docker/datbrowserQueueWorker.conf
Normal file
@ -0,0 +1,12 @@
|
||||
[program:laravel-worker]
|
||||
process_name=%(program_name)s_%(process_num)02d
|
||||
command=php %(wd)/artisan queue:work --queue=high,default --tries=3 --timeout=300 --sleep=3 --no-interaction
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stopasgroup=true
|
||||
killasgroup=true
|
||||
user=forge
|
||||
numprocs=8
|
||||
redirect_stderr=true
|
||||
stdout_logfile=%(wd)/worker.log
|
||||
stopwaitsecs=3600
|
@ -7,7 +7,7 @@ php ./artisan migrate --force
|
||||
php ./artisan optimize:clear && php ./artisan optimize
|
||||
|
||||
# Queue worker
|
||||
php ./artisan queue:work --queue=high,default --tries=3 --timeout=300 --sleep=3 --daemon --no-interaction &
|
||||
supervisorctl start "laravel-worker:*"
|
||||
|
||||
# Start all of the server sumulataneously
|
||||
php ./artisan serve --no-interaction -vvv --port=80 --host=0.0.0.0
|
||||
|
Reference in New Issue
Block a user