-
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
Added function to check against running/pending/successful cron tasks #23312
Added function to check against running/pending/successful cron tasks #23312
Conversation
Hi @chickenland. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
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.
Hi @chickenland,
Thank you for contribution! Your changes looks good to me.
Unfortunately there is failing static tests. Could you fix code to make tests pass, squash all changes into single commit and force push?
Also looks like method getPendingSchedules
not used anymore and should be safely removed
Thank you in advance
Pushed up changes that should fix the tests. I believe that getPendingSchedules is still used within processPendingJobs and shouldn't be removed at this time. |
Added type missing for static call Updated static code tests again
Pushed another series - I might need a pointer on what is failing as I can't figure it out from the message that's returned. |
@ihor-sviziev Could you give me a steer on what needs fixing here? I can't seem to figure it out from the static test results in https://testing-service.magento-community.engineering/reports/magento/magento2/pull/23312/8d0f1771-5e56-49e4-a733-183a3aa289be/10219/Statics/allure-report-ce/index.html#suites/51d3ab4d5d77a0bc6a7ea344e9e7e6be/9d0419465c8ec328/ |
@ihor-sviziev @chickenland static tests fixed. |
Thanks @engcom-Foxtrot ! Was it just a case of addressing the ones that couldn't be auto fixed? From the looks of it, this was around things I don't think I'd changed :/ |
@magento run all tests |
Hi @ihor-sviziev, thank you for the review.
|
Hi @chickenland, thank you for your contribution! |
i am getting this swarm of cron in scheduler suspect this to be the reason behind high cpu usage. Magento CE 2.3.4 3696244 | yotpo_yotpo_orders_sync | pending | NULL | 2020-08-29 16:57:07 | 2020-08-29 17:06:00 | NULL | NULL | |
@anuprasadkummali |
This PR adds function to filter all correctly run, running or pending cron tasks.
Description (*)
If a cron has just been run, cache is cleared and the cron processed again, then scheduled tasks reschedule for the same time.
Fixed Issues (if relevant)
Manual testing scenarios (*)
When not updated, running
bin/magento cron:run && bin/magento cache:flush
repeatedly will cause tasks that have completed to be rescheduled - leading to many tasks repeating. This should no longer happen.