Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Created January 21, 2015 21:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jchristopher/0913bedeb5a92f21fc34 to your computer and use it in GitHub Desktop.
Save jchristopher/0913bedeb5a92f21fc34 to your computer and use it in GitHub Desktop.
Modify the number of times the SearchWP indexer will retry an insert when faced with a Deadlock
<?php
// only try to recover from INSERT Deadlock 3 times
function my_searchwp_indexer_max_attempts( $number_of_attempts ) {
return 3;
}
add_filter( 'searchwp_indexer_max_attempts', 'my_searchwp_indexer_max_attempts' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment