Merge pull request #57 from ss23/more_sql_pls

Add a no-op query to prevent database timeouts during a long reindex
This commit is contained in:
Damian Mooyman 2014-10-24 16:15:00 +13:00
commit 0d22bf7a36
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');
}
}
}