/** * @param \MyTester\Job $job * @return string */ protected function runJob(Job $job) { $jobName = $this->getJobName(\Nette\Reflection\Method::from($job->callback[0], $job->callback[1])); Environment::$currentJob = $jobName; if (!$job->skip) { $this->setUp(); } $job->execute(); if (!$job->skip) { $this->tearDown(); } Environment::$currentJob = ""; switch ($job->result) { case "passed": return "."; break; case "skipped": return "s"; break; case "failed": return "F"; break; } return ""; }
/** * 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); }
/** * run the job if * * @param JobList $jobList * @param \OC\Log $logger */ public function execute($jobList, $logger = null) { if (time() - $this->lastRun > $this->interval) { parent::execute($jobList, $logger); } }