【问题标题】:Laravel queue - running as a daemonLaravel 队列 - 作为守护进程运行
【发布时间】:2015-04-16 06:31:59
【问题描述】:

我正在尝试设置 here 中提到的 Laravel beanstalkd 队列。我需要将队列处理程序作为守护进程运行。

尝试运行命令:php artisan queue:work --daemon

但似乎没有为 queue:work 定义“deamon”命令

>php artisan queue:work --help
Usage:
 queue:work [--queue[="..."]] [--delay[="..."]] [--force] [--        memory[="..."]] [--sleep[="..."]] [--tries[="..."]] [connection]

Arguments:
 connection            The name of connection

Options:
 --queue               The queue to listen on
 --delay               Amount of time to delay failed jobs (default: 0)
 --force               Force the worker to run even in maintenance mode
 --memory              The memory limit in megabytes (default: 128)
 --sleep               Number of seconds to sleep when no job is     available (default: 3)
 --tries               Number of times to attempt a job before logging it     failed (default: 0)
 --help (-h)           Display this help message.
 --quiet (-q)          Do not output any message.
 --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal     output, 2 for more verbose output and 3 for debug
 --version (-V)        Display this application version.
 --ansi                Force ANSI output.
 --no-ansi             Disable ANSI output.
 --no-interaction (-n) Do not ask any interactive question.
 --env                 The environment the command should run under

我正在使用 Larvel 4

 >php artisan --version

 Laravel Framework version 4.1.31

知道为什么我的设置中 queue:work 命令缺少“守护进程”属性吗?

谢谢

【问题讨论】:

    标签: php laravel-4 queue beanstalkd


    【解决方案1】:

    守护进程选项可用于 Laravel 4.2+。 将 laravel 更新到 4.2,您可以通过运行 composer update 获得该选项。

    【讨论】:

    • 谢谢,它成功了。还有一个疑问:我需要能够运行“php artisan queue:work --daemon”并关闭终端并希望守护程序继续在后台运行。但命令不返回。是否可以在后台运行?
    • @Krishna Shetty 你应该查看 supervisord 来处理你的工作。
    猜你喜欢
    • 2023-03-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-09-22
    • 2012-12-03
    • 2011-08-25
    • 1970-01-01
    • 2011-07-21
    相关资源
    最近更新 更多