本文整理汇总了PHP中Illuminate\Queue\QueueManager类的典型用法代码示例。如果您正苦于以下问题:PHP QueueManager类的具体用法?PHP QueueManager怎么用?PHP QueueManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了QueueManager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: registerSortedRedisConnector
/**
* @param \Illuminate\Queue\QueueManager $manager
* @return void
*/
protected function registerSortedRedisConnector($manager)
{
$app = $this->app;
$manager->addConnector("sorted-redis", function () use($app) {
return new SortedRedisConnector($app["redis"]);
});
}
开发者ID:kevinsimard,项目名称:laravel-sorted-queue,代码行数:11,代码来源:SortedQueueServiceProvider.php
示例2: registerRedisConnector
/**
* Register the Redis queue connector.
*
* @param \Illuminate\Queue\QueueManager $manager
* @return void
*/
protected function registerRedisConnector($manager)
{
$app = $this->app;
$manager->extend('redis', function () use($app) {
return new RedisConnector($app['redis']);
});
}
开发者ID:owlgrin,项目名称:plus,代码行数:13,代码来源:QueueServiceProvider.php
示例3: registerGaeConnector
/**
* Register the GAE queue connector.
*
* @param \Illuminate\Queue\QueueManager $manager
* @return void
*/
protected function registerGaeConnector($manager)
{
$app = $this->app;
$manager->addConnector('gae', function () use($app) {
return new GaeConnector($app['encrypter'], $app['request']);
});
}
开发者ID:wasay,项目名称:GaeSupportL5,代码行数:13,代码来源:QueueServiceProvider.php
示例4: registerResqueConnector
/**
* Register the Resque queue connector.
*
* @param \Illuminate\Queue\QueueManager $manager
* @return void
*/
protected function registerResqueConnector($manager)
{
$manager->addConnector('resque', function () {
$config = Config::get('database.redis.default');
Config::set('queue.connections.resque', array_merge($config, ['driver' => 'resque']));
return new ResqueConnector();
});
}
开发者ID:deboorn,项目名称:laravelcommandbusresqueex,代码行数:14,代码来源:ResqueServiceProvider.php
示例5: registerResqueConnector
/**
* Register the Resque queue connector.
*
* @param \Illuminate\Queue\QueueManager $manager
* @return void
*/
protected function registerResqueConnector($manager)
{
$connections = Config::get('queue.connections', []);
foreach ($connections as $connection) {
if ($connection['driver'] !== 'resque') {
$manager->addConnector($connection['driver'], function () {
return new ResqueConnector();
});
}
}
$manager->addConnector('resque', function () {
$config = Config::get('database.redis.default');
Config::set('queue.connections.resque', array_merge($config, ['driver' => 'resque']));
return new ResqueConnector();
});
}
开发者ID:darrylkuhn,项目名称:laravel-resque,代码行数:22,代码来源:ResqueServiceProvider.php
示例6: registerIronConnector
/**
* Register the IronMQ queue connector.
*
* @param \Illuminate\Queue\QueueManager $manager
* @return void
*/
protected function registerIronConnector($manager)
{
$app = $this->app;
$manager->addConnector('iron', function () use($app) {
return new IronConnector($app['encrypter'], $app['request']);
});
$this->registerIronRequestBinder();
}
开发者ID:jordeytje,项目名称:vlamteddybeer,代码行数:14,代码来源:QueueServiceProvider.php
示例7: registerMongoDBConnector
/**
* Register the Async queue connector.
*
* @param \Illuminate\Queue\QueueManager $manager
*
* @return void
*/
protected function registerMongoDBConnector($manager)
{
$manager->addConnector('mongodb', function () {
return new MongoDBConnector($this->app['db']);
});
}
开发者ID:chefsplate,项目名称:laravel-mongodb-queue,代码行数:13,代码来源:MongoDBServiceProvider.php
示例8: registerStompConnector
/**
* Register the Stomp queue connector.
*
* @param \Illuminate\Queue\QueueManager $manager
*
* @return void
*/
protected function registerStompConnector($manager)
{
$manager->addConnector('stomp', function () {
return new StompConnector();
});
}
开发者ID:mayconbordin,项目名称:l5-stomp-queue,代码行数:13,代码来源:StompServiceProvider.php
示例9: registerConnector
/**
* Register the MNS queue connector.
*
* @param \Illuminate\Queue\QueueManager $manager
*
* @return void
*/
protected function registerConnector($manager)
{
$manager->addConnector('mns', function () {
return new MNSConnector();
});
}
开发者ID:lokielse,项目名称:laravel-mns,代码行数:13,代码来源:LaravelMNSServiceProvider.php
示例10: getName
/**
* Get the full name for the given connection.
*
* @param string $connection
* @return string
* @static
*/
public static function getName($connection = null)
{
return \Illuminate\Queue\QueueManager::getName($connection);
}
开发者ID:razerbite,项目名称:frisco_foundry,代码行数:11,代码来源:_ide_helper.php
示例11: registerAsyncConnector
/**
* Register the Async queue connector.
*
* @param \Illuminate\Queue\QueueManager $manager
*
* @return void
*/
protected function registerAsyncConnector($manager)
{
$manager->addConnector('async', function () {
return new AsyncConnector($this->app['db']);
});
}
开发者ID:barryvdh,项目名称:laravel-async-queue,代码行数:13,代码来源:AsyncServiceProvider.php
示例12: registerSqsConnector
/**
* Register the Amazon SQS queue connector.
*
* @param \Illuminate\Queue\QueueManager $manager
* @return void
*/
protected function registerSqsConnector($manager)
{
$manager->addConnector('sqs', function () {
return new SqsConnector();
});
}
开发者ID:sapwoo,项目名称:portfolio,代码行数:12,代码来源:QueueServiceProvider.php
示例13: isDownForMaintenance
/**
* Determine if the application is in maintenance mode.
*
* @return bool
* @static
*/
public static function isDownForMaintenance()
{
return \Illuminate\Queue\QueueManager::isDownForMaintenance();
}
开发者ID:satriashp,项目名称:tour,代码行数:10,代码来源:_ide_helper.php
示例14: registerIronConnector
/**
* Register the IronMQ queue connector.
*
* @param \Illuminate\Queue\QueueManager $manager
* @return void
*/
protected function registerIronConnector($manager)
{
$app = $this->app;
$manager->addConnector('iron', function () use($app) {
return new IronConnector($app['request']);
});
}
开发者ID:shinichi81,项目名称:laravel4demo,代码行数:13,代码来源:QueueServiceProvider.php
示例15: process
/**
* {@inheritdoc}
*
* @throws \RuntimeException Thrown if the queue has not been set.
*/
public function process($url, $data, array $headers = [])
{
if (empty($this->queue)) {
throw new RuntimeException('Queue not set');
}
$data = ['url' => $url, 'data' => $data, 'headers' => $headers, 'transport' => $this->transport->toArray()];
$this->queue->push('rcrowe\\Raven\\Handler\\Laravel\\Job', $data);
}
开发者ID:RamaneekGill,项目名称:Raven,代码行数:13,代码来源:Laravel.php
示例16: push
/**
* Pushes a job into a specific queue connection.
*
* If you are using multiple SQS queues, this method might be useful.
* Instead of having to provide the whole queue URL every time you want to
* push a job into it, you just provide the name of the queue connection
* as set in the configuration file.
*
* @param mixed $job
* @param array $data
* @param string $connection Name of the connection
* @param string $queue
*
* @return mixed
*/
public function push($job, array $data, $connection = null, $queue = null)
{
if ($connection == null) {
return $this->manager->push($job, $data, $queue);
}
$connection = $this->manager->connection($connection);
return $connection->push($job, $data, $queue);
}
开发者ID:MarkVaughn,项目名称:illuminated,代码行数:23,代码来源:QueuePusher.php
示例17: handle
/**
* Handle the event.
*
* @param VoteWasOpened $event
* @return void
*/
public function handle(VoteWasOpened $event)
{
/**
* Queue OpenVoteCommand
*/
$command = new CloseVotingCommand($event->vote);
$delay = $event->vote->close_date->timestamp - $this->carbon->now()->timestamp;
$this->queue->laterOn('voting', $delay, $command);
}
开发者ID:SkysoulDesign,项目名称:TempArk,代码行数:15,代码来源:QueueCloseVotingCommand.php
示例18: clear
/**
* {@inheritDoc}
*/
public function clear($connection, $queue)
{
$count = 0;
$connection = $this->manager->connection($connection);
while ($job = $connection->pop($queue)) {
$job->delete();
$count++;
}
return $count;
}
开发者ID:morrislaptop,项目名称:laravel-queue-clear,代码行数:13,代码来源:Clearer.php
示例19: pop
/**
* Listen to the given queue.
*
* @param string $connectionName
* @param string $queue
* @param int $delay
* @param int $memory
* @param int $sleep
* @param int $maxTries
* @return void
*/
public function pop($connectionName, $queue = null, $delay = 0, $memory = 128, $sleep = 3, $maxTries = 0)
{
$connection = $this->manager->connection($connectionName);
$job = $this->getNextJob($connection, $queue);
// If we're able to pull a job off of the stack, we will process it and
// then make sure we are not exceeding our memory limits for the run
// which is to protect against run-away memory leakages from here.
if (!is_null($job)) {
$this->process($this->manager->getName($connectionName), $job, $maxTries, $delay);
} else {
$this->sleep($sleep);
}
}
开发者ID:flelievre,项目名称:EasyVisit,代码行数:24,代码来源:Worker.php
示例20: later
/**
* Queue a new e-mail message for sending after (n) seconds.
*
* @param int $delay
* @param string $queue
* @return void
*/
public function later($delay, $queue = null)
{
if ($this->queueManager) {
$swiftMessage = $this->message->getSwiftMessage();
$this->queueManager->later($delay, new SendEmailJob($swiftMessage), $queue);
}
}
开发者ID:SerdarSanri,项目名称:mailman,代码行数:14,代码来源:Mailer.php
注:本文中的Illuminate\Queue\QueueManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论