-
Notifications
You must be signed in to change notification settings - Fork 132
FEATURE: <magentoCron> command to execute Cron Jobs #538
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
Conversation
…eration cron required interval (60 seconds)
What I want to achieve is to avoid constructs like in this file: https://github.com/magento/magento2/blob/0262f1428561f5c329a50bfbd62714fa58e175be/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCategoryIndexerInUpdateOnScheduleModeTest.xml Also want to reduce amount of work necessary to work it out: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lbajsarowicz could you elaborate on the value of this feature and possible use cases supporting it as opposed to creating an action group to achieve this?
My first approach used ActionGroup, but then @VladimirZaets asked me to cover my changes also for Magento EE / Magento B2B. I realised that you've introduced running Cron Jobs in... Action Groups: According to the fact, that you cannot have nested ActionGroups, I had to find another approach that would let me execute Cron Jobs having in mind that should not be ran more often than with 1 minute interval. IMO using such approach in Action Groups is not solution but workaround to the system limitation: and it's extremely unclear about "What it actually does" @okolesnyk Asked me "What if Magento change the way that So my answer is: Not, actually not. If Magento will change the way that The value behind it is possibility to replace all the strange workarounds like before mentioned: As on production environment you should never run full reindex or cache:flush. Production environment should be completely based on the fact, that Cron is running. Using all the... Is irresponsible! ... and should be avoided, showing even with Functional Tests, that we should let cron work, then everything would look as expected! without |
What also comes to my mind is the fact that not always Cron Jobs end up correctly - sometimes it ends with "Exceeded memory limit" or other errors. With |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good, could you please add a step that cover magentoCron
in one of the existing verification tests + documentation. Also some conflicts due to previous merge.
Sure. Will handle that tonight. |
# Conflicts: # src/Magento/FunctionalTestingFramework/Util/TestGenerator.php
@soumyau Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, review passed!
Description
Command executes Cron Jobs taking into consideration need of having interval between running same groups (60 seconds).
Use case:
Fixed Issues (if relevant)
N/A
Contribution checklist