当前位置: 首页>>代码示例>>PHP>>正文


PHP QueueManager::push方法代码示例

本文整理汇总了PHP中Illuminate\Queue\QueueManager::push方法的典型用法代码示例。如果您正苦于以下问题:PHP QueueManager::push方法的具体用法?PHP QueueManager::push怎么用?PHP QueueManager::push使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Illuminate\Queue\QueueManager的用法示例。


在下文中一共展示了QueueManager::push方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: queue

 /**
  * Queue a new e-mail message for sending.
  *
  * @param  string  $queue
  * @return void
  */
 public function queue($queue = null)
 {
     if ($this->queueManager) {
         $swiftMessage = $this->message->getSwiftMessage();
         $this->queueManager->push(new SendEmailJob($swiftMessage), $queue);
     }
 }
开发者ID:SerdarSanri,项目名称:mailman,代码行数:13,代码来源:Mailer.php

示例2: 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

示例3: 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

示例4: install

 /**
  * Installs dependencies.
  *
  * @return boolean
  */
 public function install()
 {
     if (!$this->isInstalling()) {
         $this->queue->push(ComposerInstallJob::class);
         return true;
     } else {
         return false;
     }
 }
开发者ID:noikiy,项目名称:mod-marketplace,代码行数:14,代码来源:ComposerInstaller.php

示例5: send

 /**
  * {@inheritdoc}
  */
 public function send($data)
 {
     // send error now if queue not set
     if (is_null($this->queue)) {
         return $this->sendError($data);
     }
     // put the job into the queue
     // Sync connection will sent directly
     // if failed to add job to queue send it now
     try {
         $this->queue->push('Clowdy\\Raven\\Job', $data, $this->customQueue);
     } catch (Exception $e) {
         $this->sendError($data);
     }
     return;
 }
开发者ID:brucewu16899,项目名称:laravel-raven,代码行数:19,代码来源:Client.php

示例6: queue

 /**
  * Queues a SMS message.
  *
  * @param string $view The desired view.
  * @param array $data An array of data to fill the view.
  * @param  \Closure|string $callback The callback to run on the Message class.
  * @param null|string $queue The desired queue to push the message to.
  * @return void
  */
 public function queue($view, $data, $callback, $queue = null)
 {
     $callback = $this->buildQueueCallable($callback);
     $this->queue->push('sms@handleQueuedMessage', compact('view', 'data', 'callback'), $queue);
 }
开发者ID:borislalov,项目名称:simple-sms,代码行数:14,代码来源:SMS.php

示例7: queue

 /**
  * Queue a new e-mail message for sending.
  *
  * @param  string|array  $view
  * @param  array   $data
  * @param  \Closure|string  $callback
  * @param  string  $queue
  * @return mixed
  */
 public function queue($view, array $data, $callback, $queue = null)
 {
     $callback = $this->buildQueueCallable($callback);
     return $this->queue->push('laravel-swiftmailer.mailer@handleQueuedMessage', compact('view', 'data', 'callback'), $queue);
 }
开发者ID:yozaz,项目名称:laravel-swiftmailer,代码行数:14,代码来源:Mailer.php

示例8: process

 /**
  * {@inheritdoc}
  */
 public function process(Client $client, array $message)
 {
     $data = array('message' => $this->encodeMessage($message), 'client' => Client::getClientOptions($client), 'transport' => $this->getTransport()->toArray());
     $this->queue->push('rcrowe\\Raven\\Handler\\Laravel\\Job', $data);
 }
开发者ID:tonijz,项目名称:raven,代码行数:8,代码来源:Laravel.php

示例9: queue

 /**
  * Send the message and options to HipchatQueueNotifier
  * so that we're not trying to process the API call to
  * HipChat synchronously.
  *
  * @param string $message
  * @param array $options Same options as class constructor
  * @return mixed
  */
 protected function queue($message, array $options)
 {
     $data = ['message' => $message, 'options' => $options];
     return $this->queue->push(HipchatQueueNotifier::class, $data);
 }
开发者ID:opb,项目名称:laravel-hipchat,代码行数:14,代码来源:HipchatNotifier.php

示例10: queue

 /**
  * Queue a new e-mail message for sending.
  *
  * @param  string  $queue
  * @return void
  */
 public function queue($queue = null)
 {
     if ($this->queue) {
         $this->queue->push('mailman@handleQueuedMessage', array('message' => serialize($this->getMessageForSending())), $queue);
     }
 }
开发者ID:wvanbreukelen,项目名称:mailman,代码行数:12,代码来源:Mailman.php


注:本文中的Illuminate\Queue\QueueManager::push方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。