queue --daemon 这个选项被弃用了?
laravel队列的--daemon参数被不赞成使用吗?
查阅了下各个版本的illuminate/queue/workCommand.php文件,发现从5.3开始就有个Deprecated注释在queue:work命令后面
在实际使用过程中,发现daemon参数会是框架不是每次队列执行时重新加载,如果没有手动释放变量内存,会导致内存占用持续过高,所以改用了queue:work --once,使框架每次执行一个队列任务都开启一个进程。
protected $signature = 'queue:work
{connection? : The name of the queue connection to work}
{--queue= : The names of the queues to work}
{--daemon : Run the worker in daemon mode (Deprecated)}
{--once : Only process the next job on the queue}
{--delay=0 : Amount of time to delay failed jobs}
{--force : Force the worker to run even in maintenance mode}
{--memory=128 : The memory limit in megabytes}
{--sleep=3 : Number of seconds to sleep when no job is available}
{--timeout=60 : The number of seconds a child process can run}
{--tries=0 : Number of times to attempt a job before logging it failed}';