Use symfony scheduler instead of own "Scheduled Task" implementation #3362
Replies: 3 comments
-
Keep an eye on stucked scheduled tasks (e.g. after deployment). This is an major issue for every shop. An simple reset command would help :) |
Beta Was this translation helpful? Give feedback.
-
I'd strongly support this proposal. @keulinho is there any update on this, still on schedule für 6.6? |
Beta Was this translation helpful? Give feedback.
-
We added support for scheduled task execution in experimental state, refer to the docs MR: shopware/docs#1247 Currently symfony does not support every case we had (e.g. changing schedules at runtime) therefore we couldn't make it the default option for now, but please try it out and report back, we strongly consider moving to the scheduler in the future. Hint: For now you need to restart the scheduler processes manually, after you changed a schedule in the DB, but this might be an edge case, as there isn't even UI in the default storefront ( as that is only part of the FroshTools plugin) |
Beta Was this translation helpful? Give feedback.
-
Effort
Medium
Description
Symfony recently added a scheduler component, we should use that instead of our own “Scheduled Task” implementation for the future.
Scheduler component (Symfony Components)
Benefit
Less code and framework level functionality that we have to maintain and support. Additionally, sticking to the Symfony way of doing things allows making best use of the existing Symfony ecosystem and also requires less specialized shopware knowledge from devs trying to use those features.
Break strategy
The command to run the scheduled tasks will have to be changed for every installation.
Besides that, we should try to keep the way that you can programmatically add scheduled tasks backwards compatible for the start, and maybe deprecate it for later versions. At least try to make the transition as smooth as possible.
Beta Was this translation helpful? Give feedback.
All reactions