コード例 #1
0
ファイル: job.php プロジェクト: omusico/isle-web-framework
 /**
  * @param JobList $jobList
  * @param \OC\Log $logger
  */
 public function execute($jobList, $logger = null)
 {
     $jobList->setLastRun($this);
     try {
         $this->run($this->argument);
     } catch (\Exception $e) {
         if ($logger) {
             $logger->error('Error while running background job: ' . $e->getMessage());
         }
         $jobList->remove($this, $this->argument);
     }
 }
コード例 #2
0
ファイル: queuedjob.php プロジェクト: adolfo2103/hcloudfilem
 /**
  * run the job, then remove it from the joblist
  *
  * @param JobList $jobList
  * @param \OC\Log $logger
  */
 public function execute($jobList, $logger = null)
 {
     $jobList->remove($this, $this->argument);
     parent::execute($jobList, $logger);
 }