- Renames TaskScheduler to CronTrigger and updates relevant code
- Standardizes setting value const naming convention
This commit is contained in:
18
lib/Cron/Workers/SendingQueue/Tasks/Cron.php
Normal file
18
lib/Cron/Workers/SendingQueue/Tasks/Cron.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
namespace MailPoet\Cron\Workers\SendingQueue\Tasks;
|
||||
|
||||
use MailPoet\Cron\CronHelper;
|
||||
use MailPoet\Cron\CronTrigger;
|
||||
|
||||
if(!defined('ABSPATH')) exit;
|
||||
|
||||
class Cron {
|
||||
static function complete() {
|
||||
// when there are no more queues to process and if the task
|
||||
// scheduler method is WP, delete the cron daemon
|
||||
$task_scheduler = CronTrigger::getCurrentMethod();
|
||||
if($task_scheduler === CronTrigger::METHOD_WORDPRESS) {
|
||||
CronHelper::deleteDaemon();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user