Verified Commit 9c3a0928 authored by Erick Hitter's avatar Erick Hitter
Browse files

Prevent cron rebuilding from running forever

parent 4f378557
...@@ -89,6 +89,12 @@ class Cron_Options_CPT extends Singleton { ...@@ -89,6 +89,12 @@ class Cron_Options_CPT extends Singleton {
$page++; $page++;
// Something's probably wrong if a site has more than 1,500 pending cron actions
if ( $page > 15 ) {
do_action( 'a8c_cron_control_stopped_runaway_cron_option_rebuild' );
break;
}
// Loop through results and built output Core expects // Loop through results and built output Core expects
if ( ! empty( $jobs_posts ) ) { if ( ! empty( $jobs_posts ) ) {
foreach ( $jobs_posts as $jobs_post ) { foreach ( $jobs_posts as $jobs_post ) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment