【问题标题】:Laravel managing queue supervisor for production and staging on single serverLaravel 管理队列管理器,用于在单个服务器上进行生产和登台
【发布时间】:2020-06-29 10:44:24
【问题描述】:

我在一个数字海洋水滴上有两个站点,生产和登台。我已经根据文档安装了队列管理器:sudo apt-get install supervisor,并在/etc/supervisor/conf.d 中配置了两个配置文件,如下所示:

laravel-worker.conf:

[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/app.com/artisan queue:work database --sleep=3 --tries=3
autostart=true
autorestart=true
user=root
numprocs=1
redirect_stderr=true
stdout_logfile=/var/www/app.com/worker.log
stopwaitsecs=3600 

laravel-worker-staging.conf:

[program:laravel-worker-staging]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/test.app.com/artisan queue:work database --sleep=3 --tries=3
autostart=true
autorestart=true
user=root
numprocs=1
redirect_stderr=true
stdout_logfile=/var/www/test.app.com/worker.log
stopwaitsecs=3600  

完成测试后,我将禁用 test.app.com 的服务器块,以防止随机用户访问该站点。我是否需要对队列管理器执行任何操作,因为它仍将在测试站点的后台运行,或者可能是 laravel-worker-staging.conf 以防止它不必要地耗尽服务器资源?

【问题讨论】:

    标签: laravel ubuntu queue


    【解决方案1】:

    看来我可以发出以下命令:

    supervisorctl stop laravel-worker-staging
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-07-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-12-04
      • 2014-03-20
      相关资源
      最近更新 更多