bztang-admin/vendor/laravel/framework/src/Illuminate/Queue
wuhui_zzw 819d549907 初始化 2023-09-25 17:52:31 +08:00
..
Capsule 初始化 2023-09-25 17:52:31 +08:00
Connectors 初始化 2023-09-25 17:52:31 +08:00
Console 初始化 2023-09-25 17:52:31 +08:00
Events 初始化 2023-09-25 17:52:31 +08:00
Failed 初始化 2023-09-25 17:52:31 +08:00
Jobs 初始化 2023-09-25 17:52:31 +08:00
BeanstalkdQueue.php 初始化 2023-09-25 17:52:31 +08:00
CallQueuedClosure.php 初始化 2023-09-25 17:52:31 +08:00
CallQueuedHandler.php 初始化 2023-09-25 17:52:31 +08:00
DatabaseQueue.php 初始化 2023-09-25 17:52:31 +08:00
InteractsWithQueue.php 初始化 2023-09-25 17:52:31 +08:00
InvalidPayloadException.php 初始化 2023-09-25 17:52:31 +08:00
LICENSE.md 初始化 2023-09-25 17:52:31 +08:00
Listener.php 初始化 2023-09-25 17:52:31 +08:00
ListenerOptions.php 初始化 2023-09-25 17:52:31 +08:00
LuaScripts.php 初始化 2023-09-25 17:52:31 +08:00
ManuallyFailedException.php 初始化 2023-09-25 17:52:31 +08:00
MaxAttemptsExceededException.php 初始化 2023-09-25 17:52:31 +08:00
NullQueue.php 初始化 2023-09-25 17:52:31 +08:00
Queue.php 初始化 2023-09-25 17:52:31 +08:00
QueueManager.php 初始化 2023-09-25 17:52:31 +08:00
QueueServiceProvider.php 初始化 2023-09-25 17:52:31 +08:00
README.md 初始化 2023-09-25 17:52:31 +08:00
RedisQueue.php 初始化 2023-09-25 17:52:31 +08:00
SerializableClosure.php 初始化 2023-09-25 17:52:31 +08:00
SerializesAndRestoresModelIdentifiers.php 初始化 2023-09-25 17:52:31 +08:00
SerializesModels.php 初始化 2023-09-25 17:52:31 +08:00
SqsQueue.php 初始化 2023-09-25 17:52:31 +08:00
SyncQueue.php 初始化 2023-09-25 17:52:31 +08:00
Worker.php 初始化 2023-09-25 17:52:31 +08:00
WorkerOptions.php 初始化 2023-09-25 17:52:31 +08:00

README.md

Illuminate Queue

The Laravel Queue component provides a unified API across a variety of different queue services. Queues allow you to defer the processing of a time consuming task, such as sending an e-mail, until a later time, thus drastically speeding up the web requests to your application.

Usage Instructions

First, create a new Queue Capsule manager instance. Similar to the "Capsule" provided for the Eloquent ORM, the queue Capsule aims to make configuring the library for usage outside of the Laravel framework as easy as possible.

use Illuminate\Queue\Capsule\Manager as Queue;

$queue = new Queue;

$queue->addConnection([
    'driver' => 'beanstalkd',
    'host' => 'localhost',
    'queue' => 'default',
]);

// Make this Capsule instance available globally via static methods... (optional)
$queue->setAsGlobal();

Once the Capsule instance has been registered. You may use it like so:

// As an instance...
$queue->push('SendEmail', ['message' => $message]);

// If setAsGlobal has been called...
Queue::push('SendEmail', ['message' => $message]);

For further documentation on using the queue, consult the Laravel framework documentation.