Add a no-op query to prevent database timeouts during a long reindex

This commit is contained in:
Stephen Shkardoon 2014-10-22 19:01:34 +13:00
parent 2ba90f4239
commit 064468a28a
1 changed files with 3 additions and 0 deletions

View File

@ -270,6 +270,9 @@ class Solr_Reindex extends BuildTask {
// If we're in dev mode, commit more often for fun and profit
if (Director::isDev()) Solr::service($index)->commit();
// This will slow down things a tiny bit, but it is done so that we don't timeout to the database during a reindex
DB::query('SELECT 1');
}
}
}