This commit is contained in:
yuri
2016-04-29 16:40:05 +03:00
parent 47efa792ee
commit 04d2bd69c1
2 changed files with 7 additions and 12 deletions
+4 -1
View File
@@ -154,8 +154,11 @@ class CronManager
}
$this->setLastRunTime(time());
$this->getCronJob()->markFailedJobs();
$this->getCronJob()->updateFailedJobAttempts();
$this->createJobsFromScheduledJobs();
$this->getCronJob()->handleExistingJobs();
$this->getCronJob()->removePendingJobDuplicates();
$pendingJobList = $this->getCronJob()->getPendingJobList();
+3 -11
View File
@@ -64,14 +64,6 @@ class Job
return $this->cronScheduledJob;
}
public function handleExistingJobs()
{
$this->markFailedJobs();
$this->markJobAttempts();
$this->removePendingJobDuplicates();
}
/**
* Get Pending Jobs
*
@@ -194,7 +186,7 @@ class Job
*
* @return void
*/
protected function markFailedJobs()
public function markFailedJobs()
{
$jobConfigs = $this->getConfig()->get('cron');
@@ -238,7 +230,7 @@ class Job
*
* @return void
*/
protected function removePendingJobDuplicates()
public function removePendingJobDuplicates()
{
$pdo = $this->getEntityManager()->getPDO();
@@ -294,7 +286,7 @@ class Job
*
* @return void
*/
protected function markJobAttempts()
public function updateFailedJobAttempts()
{
$query = "
SELECT * FROM job