From 232ef05e816fecdbb3c1a9a0e6ea568a90b640b7 Mon Sep 17 00:00:00 2001 From: Amine Ben hammou Date: Tue, 25 Jun 2019 10:57:40 +0100 Subject: [PATCH] Schedule the task --- lib/Config/Populator.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/Config/Populator.php b/lib/Config/Populator.php index fa0a42a3d1..8e0dd2e577 100644 --- a/lib/Config/Populator.php +++ b/lib/Config/Populator.php @@ -140,7 +140,7 @@ class Populator { $this->updateMetaFields(); $this->scheduleInitialInactiveSubscribersCheck(); $this->scheduleAuthorizedSendingEmailsCheck(); - $this->initLastAnnouncementDate(); + $this->scheduleBeamer(); // Will be uncommented on task [MAILPOET-1998] // $this->updateFormsSuccessMessages(); } @@ -551,10 +551,12 @@ class Populator { ); } - private function initLastAnnouncementDate() { + private function scheduleBeamer() { if (!$this->settings->get('last_announcement_date')) { - $beamer = new Beamer($this->settings, WPFunctions::get()); - $beamer->setLastAnnouncementDate(); + $this->scheduleTask( + Beamer::TASK_TYPE, + Carbon::createFromTimestamp(WPFunctions::get()->currentTime('timestamp')) + ); } }