private function getUpdatePayload(ScheduledTaskEntity
$registeredTask, ScheduledTask
$task): array
{ $payload =
[];
if (!
$task->
shouldRun($this->parameterBag
) && \
in_array($registeredTask->
getStatus(),
[ScheduledTaskDefinition::STATUS_QUEUED, ScheduledTaskDefinition::STATUS_SCHEDULED
], true
)) { $payload['status'
] = ScheduledTaskDefinition::STATUS_SKIPPED;
} if ($task->
shouldRun($this->parameterBag
) && \
in_array($registeredTask->
getStatus(),
[ScheduledTaskDefinition::STATUS_QUEUED, ScheduledTaskDefinition::STATUS_SKIPPED
], true
)) { $payload['status'
] = ScheduledTaskDefinition::STATUS_SCHEDULED;
$payload['nextExecutionTime'
] =
$this->
calculateNextExecutionTime($registeredTask);
} if ($task->
getDefaultInterval() !==
$registeredTask->
getDefaultRunInterval()) { // default run interval changed
$payload['defaultRunInterval'
] =
$task->
getDefaultInterval();
// if the run interval is still the default, update it to the new default
if ($registeredTask->
getRunInterval() ===
$registeredTask->
getDefaultRunInterval()) { $payload['runInterval'
] =
$task->
getDefaultInterval();
} }