Stop MailPoet Daemon execution when in maintenance mode
MAILPOET-6021
This commit is contained in:
committed by
Oluwaseun Olorunsola
parent
d718441e1a
commit
19ad4133ab
@ -45,6 +45,11 @@ class Daemon {
|
||||
|
||||
$errors = [];
|
||||
foreach ($this->getWorkers() as $worker) {
|
||||
if (wp_is_maintenance_mode()) {
|
||||
// stop execution when in maintenance mode
|
||||
break;
|
||||
}
|
||||
|
||||
try {
|
||||
// Clear the entity manager memory for every cron run.
|
||||
// This avoids using stale data and prevents memory leaks.
|
||||
|
Reference in New Issue
Block a user