Improve run_cron method #937
Labels
customer report
Indicates the request came from a customer.
new feature
Request for a new feature or functionality to be added to the project.
What problem does this address?
A user on WordPress.org suggested to improve the run cron method in our plugin. He wrote the following message -
I have some issues with the way your plugin is handling what feeds to push to the run_job method of “Feedzy_Rss_Feeds_Import” Your code prevents hook and overwrite of this method ( run_job is private ). So I have a simple modifications to suggest, please consider it.
in the original code from https://plugins.trac.wordpress.org/browser/feedzy-rss-feeds/trunk/includes/admin/feedzy-rss-feeds-import.php
The args used in get_post imply only the first 99 published feeds added can be processed and run_job will probably timeout way before it reach 99 feeds.
in my case i have to edit your plugins in this way
i have reduced drastically the limit to never run more than 10 feed for more than 10 article
order on last_run timestamp in order to always run the oldest feed, this way the plugin is way more stable, enable to run cron way more often et do not ignore feeds anymore.
I was enable to run the shreduled task every 15 minutes on more than 300 distinct feeds. and update all of them in the span a a day.
https://wordpress.org/support/topic/run_cron-method-is-terrible/
What is your proposed solution?
He suggests adding a simple hook on the get_post arguments and $max to enable cron behavior editing without plugin editing.
Will this feature require documentation? (Optional)
None
The text was updated successfully, but these errors were encountered: