【问题标题】:Laravel Mail::queue and supervisorLaravel 邮件::队列和主管
【发布时间】:2016-07-06 20:18:01
【问题描述】:

您好,我对 Laravel redis 队列 + 主管有一个非常奇怪的行为。 队列已插入 Redis 我可以看到它们,Supervisor 正在工作,即使我尝试手动启动 php artisan queue:work 电子邮件也不会发送。 我的配置: 队列:

'default' => 'redis',

这是我从redis-cli monitor得到的日志

2choice:illuminate:queue:restart"

我的主管:

[program:2choice]
process_name=%(program_name)s_%(process_num)02d
command=php artisan queue:work --memory=256 --sleep=3 --tries=3 --daemon --force
directory=/var/www/2choice
autostart=true
autorestart=true
user=wwwu
numprocs=8
redirect_stderr=true
stdout_logfile=/var/www/2choice/storage/logs/queue.log
stdout_logfile_maxbytes=5MB
stdout_logfile_backups=5

我也试过php artisan queue:listen,但仍然没有发送电子邮件

如果我在cmd 中运行htop,我可以看到这8 个进程正在运行。

这是它们在redis中的插入方式:

{
    "job": "mailer@handleQueuedMessage",
    "data": {
        "view": "mail.activation",
        "data": {
            "user": "dsdfs",
            "reflink": "https://www.domen.com/register/7/hrHGMgD9jwl4PmyElro86wpapmVTTdQS"
        },
        "callback": "C:32:........;}}"
    },
    "id": "yiSsPWFmBz2DfJprFJ1kD4Ti3pUdxxTR",
    "attempts": 1
}

MySQL table for failed jobs 为空

有什么帮助或建议吗?

【问题讨论】:

    标签: php mysql laravel redis supervisord


    【解决方案1】:

    好的,我解决了 我的应用在 maintenance mode. 运行 php artisan up 解决了它

    更新: 可以加evenInMaintenanceMode();

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-07-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-08
      • 2019-04-21
      • 1970-01-01
      相关资源
      最近更新 更多