Tweak Sending Service key validation after a code review [MAILPOET-743]
* Abstract key state to unbound it from the API response codes * Rename SendingServiceKeyCheck task for clarity * Add a setter for the API key in the Bridge API class * Make some smaller fixes
This commit is contained in:
@@ -3,7 +3,7 @@ namespace MailPoet\Cron;
|
||||
use MailPoet\Cron\Workers\Scheduler as SchedulerWorker;
|
||||
use MailPoet\Cron\Workers\SendingQueue\SendingQueue as SendingQueueWorker;
|
||||
use MailPoet\Cron\Workers\Bounce as BounceWorker;
|
||||
use MailPoet\Cron\Workers\SendingServiceKeyCheck as SSKeyCheckWorker;
|
||||
use MailPoet\Cron\Workers\SendingServiceKeyCheck as SendingServiceKeyCheckWorker;
|
||||
|
||||
if(!defined('ABSPATH')) exit;
|
||||
require_once(ABSPATH . 'wp-includes/pluggable.php');
|
||||
@@ -49,7 +49,7 @@ class Daemon {
|
||||
try {
|
||||
$this->executeScheduleWorker();
|
||||
$this->executeQueueWorker();
|
||||
$this->executeSSKeyCheckWorker();
|
||||
$this->executeSendingServiceKeyCheckWorker();
|
||||
$this->executeBounceWorker();
|
||||
} catch(\Exception $e) {
|
||||
// continue processing, no need to handle errors
|
||||
@@ -82,8 +82,8 @@ class Daemon {
|
||||
return $queue->process();
|
||||
}
|
||||
|
||||
function executeSSKeyCheckWorker() {
|
||||
$worker = new SSKeyCheckWorker($this->timer);
|
||||
function executeSendingServiceKeyCheckWorker() {
|
||||
$worker = new SendingServiceKeyCheckWorker($this->timer);
|
||||
return $worker->process();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user