Only create the backfill task once
MAILPOET-5404
This commit is contained in:
committed by
Veljko V
parent
2078ddf292
commit
c9dda915dc
@@ -714,6 +714,14 @@ class Populator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function scheduleBackfillEngagementData(): void {
|
private function scheduleBackfillEngagementData(): void {
|
||||||
|
$existingTask = $this->scheduledTasksRepository->findOneBy(
|
||||||
|
[
|
||||||
|
'type' => BackfillEngagementData::TASK_TYPE,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
if ($existingTask) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
$this->scheduleTask(
|
$this->scheduleTask(
|
||||||
BackfillEngagementData::TASK_TYPE,
|
BackfillEngagementData::TASK_TYPE,
|
||||||
Carbon::createFromTimestamp($this->wp->currentTime('timestamp'))
|
Carbon::createFromTimestamp($this->wp->currentTime('timestamp'))
|
||||||
|
Reference in New Issue
Block a user