當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Job::fire方法代碼示例

本文整理匯總了PHP中Illuminate\Queue\Jobs\Job::fire方法的典型用法代碼示例。如果您正苦於以下問題:PHP Job::fire方法的具體用法?PHP Job::fire怎麽用?PHP Job::fire使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Illuminate\Queue\Jobs\Job的用法示例。


在下文中一共展示了Job::fire方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: fire

 /**
  * Fire the job.
  *
  * @return void
  */
 public function fire()
 {
     if (method_exists($this, 'resolveAndFire')) {
         $this->resolveAndFire(json_decode($this->getRawBody(), true));
         return;
     }
     parent::fire();
 }
開發者ID:dusterio,項目名稱:laravel-aws-worker,代碼行數:13,代碼來源:AwsJob.php

示例2: process

 /**
  * Process a given job from the queue.
  *
  * @param  \Illuminate\Queue\Jobs\Job  $job
  * @param  int  $delay
  * @return void
  */
 public function process(Job $job, $delay)
 {
     try {
         // First we will fire off the job. Once it is done we will see if it will
         // be auto-deleted after processing and if so we will go ahead and run
         // the delete method on the job. Otherwise we will just keep moving.
         $job->fire();
         if ($job->autoDelete()) {
             $job->delete();
         }
     } catch (\Exception $e) {
         // If we catch an exception, we will attempt to release the job back onto
         // the queue so it is not lost. This will let is be retried at a later
         // time by another listener (or the same one). We will do that here.
         $job->release($delay);
         throw $e;
     }
 }
開發者ID:centaurustech,項目名稱:sagip,代碼行數:25,代碼來源:Worker.php

示例3: fire

 /**
  * Fire the job.
  *
  * @return void
  */
 public function fire()
 {
     $this->job->fire();
 }
開發者ID:exolnet,項目名稱:laravel-queue,代碼行數:9,代碼來源:ProxyJob.php


注:本文中的Illuminate\Queue\Jobs\Job::fire方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。