Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Using the Symfony Scheduler #90

Open
JoppeDC opened this issue Oct 13, 2023 · 2 comments
Open

[Feature] Using the Symfony Scheduler #90

JoppeDC opened this issue Oct 13, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@JoppeDC
Copy link

JoppeDC commented Oct 13, 2023

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
With the stable release of the Symfony Scheduler (exp. since 6.3) component right around the corner, we should keep into account that soon we will be able to use that to handle scheduling and handling of commands.

Therefore, it might be wise to already start thinking about this, when changing or adding current features to this project.
I think the Scheduler component will be able to remove a lot of code from this repo, and therefore would be the clear better choice in the future.

As a quick example, the logic used to check if a command should be scheduled to run, and when, can be condensed into this single line:

(new Schedule())->add(RecurringMessage::cron($command->getCronExpression(), new CommandMessage($command)));

If you would like any help on making this happen, let me know, and i'd love to help out with the transition

@oallain
Copy link
Member

oallain commented Oct 17, 2023

Hello @JoppeDC ,

Thanks for this issue, i think it can be a good thing.
I think it would be a good idea to let the user choose between using the current system (based on a Command launched by a Cron) and using the Symfony Scheduler (based on Symfony Messenger).
What do you think?

If you'd like to do a PR, we'd be delighted to integrate it once it's finished.

@oallain oallain added the enhancement New feature or request label Oct 17, 2023
@oallain
Copy link
Member

oallain commented Dec 6, 2023

Hello @JoppeDC ,

Symfony 7 is now release.
Do you want to work on this feature or do you prefer I work on?
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants