Skip to content

Conversation

@bi0xid
Copy link

@bi0xid bi0xid commented Jul 16, 2016

Clears unused scheduled events in wp_options cron before adding a new
scheduled event. Prevents server exhaustion and several problems when having heavy loads of information in wp_options cron.

Solves
https://disqus.com/home/channel/discussdisqus/discussion/channel-discuss
disqus/tons_of_dsq_sync_forum_entries_in_cron_row_wp_options_and_10x_ser
ver_loads/
Solves
https://wordpress.org/support/topic/high-server-load-and-dsq_sync_forum-
problem

Clears unused scheduled events in wp_options cron before adding a new
scheduled event.
Solves
https://disqus.com/home/channel/discussdisqus/discussion/channel-discuss
disqus/tons_of_dsq_sync_forum_entries_in_cron_row_wp_options_and_10x_ser
ver_loads/
Solves
https://wordpress.org/support/topic/high-server-load-and-dsq_sync_forum-
problem
@archon810
Copy link
Contributor

This will just continue clearing and postponing and never running the Disqus sync cron job on a busy server.

}
} else {
wp_clear_scheduled_hook( 'dsq_sync_forum' );
$ts = time() + 300;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this may not work. Rather ba0a89e is better solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants