-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Add --exclude-group to cron:run #34117
Add --exclude-group to cron:run #34117
Conversation
https://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-cron.html#config-cli-cron-group-run When you decide to split a single cron group with the `--group` flag it means you need to do so for every group in your instance. It's pretty common for third party modules to define their own groups whenever they like, so we have to keep up to date with the defined groups in the instance to keep adding these to our crontab when required. One of my instances currently has 11 groups to manage, more will come in the future. In my case I only really want to run the crons like ``` * * * * * bin/magento cron:run --exclude-group index * * * * * flock -n index.lock bin/magento cron:run --group index ``` This will give me better granular control over the indexer crons which can be useful when your store reaches hundreds of thousands of SKUs For future proofing I've made the `--exclude-group` flag stackable so you can define it multiple times like ``` * * * * * bin/magento cron:run --exclude-group index --exclude-group consumers ```
@magento run all tests |
Hi @convenient. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
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.
Not sure why the sniffer is complaining about the CronCommand.php file as those code elements have been there for sometime.
However the sniffer errors in the test file need to be fixed. If you search the code base for 'array_filter' you will see how the use of 'function' needs to be formatted.
Once the errors are fixed we can give it a proper review :)
@BarnyShergold Aye i spotted that as well. I think maybe Do you want me to address all static defects in I am on a few days annual leave now, will fix my dodgy |
if you can, that would be great - save any aggro :) |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@BarnyShergold Two failures in this test run for the static analysis
As per magento/magento-coding-standard#154 I have no idea what to do with this issue. I've checked a bunch of different core console commands and they all look the same to me. Looking at https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc it says
So 🤷 not sure what I can do here. Please advise. This one seems like a false alert to me, I didn't touch anything remotely near this area so not sure why its popping up.
|
Exclude the staging group etc, not relevant for our test
Exclude the staging group etc, not relevant for our test
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run Functional Tests CE |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run Static Tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@BarnyShergold Yeah those two same failures again. what to do with the |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
1 similar comment
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run Functional Tests CE |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
1 similar comment
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
2 similar comments
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
Description
https://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-cron.html#config-cli-cron-group-run
When you decide to split a single cron group with the
--group
flag it means you need to do so for every group in your instance.It's pretty common for third party modules to define their own groups whenever they like, so we have to keep up to date with the defined groups in the instance to keep adding these to our crontab when new groups are added.
One of my instances currently has 11 groups to manage, more will come in the future and its just something I need to mentally keep an eye on, a bit annoying.
In my case I only really want to run the crons like
This will give me better granular control over the indexer crons which can be useful when your store reaches hundreds of thousands of SKUs. Any other random cron groups would then still be able to run by default like in normal operation.
For future proofing I've made the
--exclude-group
flag stackable so you can define it multiple times likeManual testing scenarios (*)
Contribution checklist (*)
Resolved issues: