XGallery – Bài toán queues và workers trên VPS Hostvn

Trước khi vô bài này thì mình share trước con supervisor hiện tại

[program:default-worker]
process_name=%(program_name)s_%(process_num)02d
command=/usr/bin/php /home/soulevil/www/XGallery/artisan queue:work --tries=5
autostart=true
autorestart=true
user=soulevil
numprocs=6
redirect_stderr=true
stdout_logfile=/home/soulevil/www/XGallery/storage/logs/default-worker.log
stopwaitsecs=3600

[program:downloads-worker]
process_name=%(program_name)s_%(process_num)02d
command=/usr/bin/php /home/soulevil/www/XGallery/artisan queue:work --queue=downloads --tries=5
autostart=true
autorestart=true
user=soulevil
numprocs=4
redirect_stderr=true
stdout_logfile=/home/soulevil/www/XGallery/storage/logs/downloads-worker.log
stopwaitsecs=3600

[program:batdongsan-worker]
process_name=%(program_name)s_%(process_num)02d
command=/usr/bin/php /home/soulevil/www/XGallery/artisan queue:work --queue=batdongsan --tries=5
autostart=true
autorestart=true
user=soulevil
numprocs=4
redirect_stderr=true
stdout_logfile=/home/soulevil/www/XGallery/storage/logs/batdongsan-worker.log
stopwaitsecs=3600

[program:truyenchon-worker]
process_name=%(program_name)s_%(process_num)02d
command=/usr/bin/php /home/soulevil/www/XGallery/artisan queue:work --queue=truyenchon --tries=5
autostart=true
autorestart=true
user=soulevil
numprocs=4
redirect_stderr=true
stdout_logfile=/home/soulevil/www/XGallery/storage/logs/truyenchon-worker.log
stopwaitsecs=3600

[program:flickr-worker]
process_name=%(program_name)s_%(process_num)02d
command=/usr/bin/php /home/soulevil/www/XGallery/artisan queue:work --queue=flickr --tries=5
autostart=true
autorestart=true
user=soulevil
numprocs=2
redirect_stderr=true
stdout_logfile=/home/soulevil/www/XGallery/storage/logs/flickr-worker.log
stopwaitsecs=3600

[program:limited-worker]
process_name=%(program_name)s_%(process_num)02d
command=/usr/bin/php /home/soulevil/www/XGallery/artisan queue:work --queue=limited --tries=5
autostart=true
autorestart=true
user=soulevil
numprocs=2
redirect_stderr=true
stdout_logfile=/home/soulevil/www/XGallery/storage/logs/limited-worker.log
stopwaitsecs=3600

Pages: 1 2

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Up ↑

<span>%d</span> bloggers like this: