Schedule the task

This commit is contained in:
Amine Ben hammou
2019-06-25 10:57:40 +01:00
committed by M. Shull
parent ac54e198bf
commit 232ef05e81

View File

@ -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'))
);
}
}