Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug symfony#50818 [Scheduler] Fix
PeriodicalTrigger
from argument f…
…or stateful run dates (StanJansen) This PR was squashed before being merged into the 6.3 branch. Discussion ---------- [Scheduler] Fix `PeriodicalTrigger` from argument for stateful run dates | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix symfony#50669 | License | MIT | Doc PR | - Summary: Unless you provide the `from` argument (with a date in the past), caching will not work for the `PeriodicalTrigger`. If the `from` argument is not passed to the `RecurringMessage::every` method, it will, fallback to `new \DateTimeImmutable()`. If you use a stateful schedule and you restart the consumer (either manually or using a time limit), the cached last-executed date will always be overridden by the moment you restart the scheduler due to `if ($this->from > $run) {`. Commits ------- cb9be9f [Scheduler] Fix `PeriodicalTrigger` from argument for stateful run dates
- Loading branch information