zoukankan      html  css  js  c++  java
  • laravel队列常驻运行问题 queue:

    根据官方文档使用--daemon可让队列常驻运行。对应命令行执行php artisan queue:work --daemon

    但是当前命令还是会因为使用Ctrl+C。将进程给关闭。如何常驻在后台执行?

    官方文档还让你安装 supervisor 你为什么不安装呢?

    用 supervisor 可以常驻后台,并且监控 php artisan queue:work --daemon 的运行

    这样即使重启,都可以稳定的运行队列。

    安装教程:https://www.load-page.com/bas...

    方法:2

    ##后台运行队列监听

    nohup php artisan queue:listen >/dev/null 2>&1 & 
    nohup php artisan queue:work --daemon >/dev/null 2>&1 & //不重新加载整个框架,而是直接 fire 动作
    su apache -c -l "nohup php artisan queue:work --daemon >/dev/null 2>&1 &" //以apache用户运行
    sudo -u apache -s nohupphp  artisan queue:listen --queue=wxmsg > /dev/null 2>&1 &
  • 相关阅读:
    node.js----服务器http
    node.js---对文件操作
    node.js
    历史管理
    h5
    git与github
    js中面向对象(创建对象的几种方式)
    jq基础
    POJ 2492 A Bug's Life
    POJ 1742 Coins
  • 原文地址:https://www.cnblogs.com/pxuan/p/12816774.html
Copyright © 2011-2022 走看看