Skip to content

Commit

Permalink
Merge pull request #3 from Magenerds/bugfix/clear-cron-jobs
Browse files Browse the repository at this point in the history
Fix cron clear and rename command
  • Loading branch information
sydekumf authored Aug 3, 2018
2 parents 8779850 + 57d1781 commit 3c6088d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
4 changes: 2 additions & 2 deletions Console/Command/CronProcessCheckCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public function __construct(
*/
public function configure()
{
$this->setName('magenerds:cronprocess:check');
$this->setDescription('Check running cronjobs');
$this->setName('magenerds:cronprocess:clear');
$this->setDescription('Set the status of crashed cronjobs to error');

parent::configure();
}
Expand Down
15 changes: 0 additions & 15 deletions Plugin/Model/CronSchedulePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,4 @@ public function afterTryLockJob(Schedule $subject, $canLock)

return $canLock;
}

/**
* Remove PID if status is not running
*
* @param Schedule $subject
* @param $key
* @param $value
* @return void
*/
public function beforeSetData(Schedule $subject, $key, $value = null)
{
if ($key === 'status' && $value !== Schedule::STATUS_RUNNING) {
$subject->setPid(NULL);
}
}
}

0 comments on commit 3c6088d

Please sign in to comment.