张保健 97d25c38f3 首次提交 4 gadus atpakaļ
..
Capsule 首次提交 4 gadus atpakaļ
Connectors 首次提交 4 gadus atpakaļ
Console 首次提交 4 gadus atpakaļ
Events 首次提交 4 gadus atpakaļ
Failed 首次提交 4 gadus atpakaļ
Jobs 首次提交 4 gadus atpakaļ
BeanstalkdQueue.php 首次提交 4 gadus atpakaļ
CallQueuedHandler.php 首次提交 4 gadus atpakaļ
DatabaseQueue.php 首次提交 4 gadus atpakaļ
FailingJob.php 首次提交 4 gadus atpakaļ
InteractsWithQueue.php 首次提交 4 gadus atpakaļ
InvalidPayloadException.php 首次提交 4 gadus atpakaļ
Listener.php 首次提交 4 gadus atpakaļ
ListenerOptions.php 首次提交 4 gadus atpakaļ
LuaScripts.php 首次提交 4 gadus atpakaļ
ManuallyFailedException.php 首次提交 4 gadus atpakaļ
MaxAttemptsExceededException.php 首次提交 4 gadus atpakaļ
NullQueue.php 首次提交 4 gadus atpakaļ
Queue.php 首次提交 4 gadus atpakaļ
QueueManager.php 首次提交 4 gadus atpakaļ
QueueServiceProvider.php 首次提交 4 gadus atpakaļ
README.md 首次提交 4 gadus atpakaļ
RedisQueue.php 首次提交 4 gadus atpakaļ
SerializesAndRestoresModelIdentifiers.php 首次提交 4 gadus atpakaļ
SerializesModels.php 首次提交 4 gadus atpakaļ
SqsQueue.php 首次提交 4 gadus atpakaļ
SyncQueue.php 首次提交 4 gadus atpakaļ
Worker.php 首次提交 4 gadus atpakaļ
WorkerOptions.php 首次提交 4 gadus atpakaļ
composer.json 首次提交 4 gadus atpakaļ

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', array('message' => $message));

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

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