barryvdh/laravel-async-queue
最新稳定版本:v0.8.1
Composer 安装命令:
composer require barryvdh/laravel-async-queue
包简介
Async Queue Driver for Laravel (Push to background)
README 文档
README
Available as background in Laravel v12.37
Update you config to use driver 'background' and you don't need this package anymore.
Push a function/closure to the background.
Just like the 'sync' or 'deferred' connection, this is not a real queue. It is always fired immediately. The only difference is that the closure is sent to the background without waiting for the response. This package is more usable as an alternative for running incidental tasks in the background, without setting up a 'real' queue driver. It is similar to the 'deferred' connection, but it runs in a background process, so might be more suitable for long running tasks.
Note: Since v0.8 this uses the Concurrently::defer() method instead of the database queue. No database migrations tables are required now. The config can be simplified as below.
Install
Require the latest version of this package with Composer
composer require barryvdh/laravel-async-queue
You should now be able to use the async driver in config/queue.php. Use the same config as for the database, but use async as driver.
'connections' => array(
...
'async' => array(
'driver' => 'async',
),
...
}
Set the default to async, either by changing to config or setting QUEUE_DRIVER in your .env file to async.
It should work the same as the sync driver, so no need to run a queue listener. Downside is that you cannot actually queue or plan things. Queue::later() is also fired directly. For more info see http://laravel.com/docs/queues
统计信息
- 总下载量: 491.13k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 291
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-09-13