Laravel队列 - 作为守护进程运行

时间:2015-02-15 18:42:12

标签: php laravel-4 queue beanstalkd

我正在尝试按照here设置Laravel beanstalkd队列。我需要将队列处理程序作为守护程序运行。

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

但看起来像'deamon'命令没有为queue:work

定义
>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命令缺少'daemon'属性的原因?

由于

1 个答案:

答案 0 :(得分:2)

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