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:
commit
0d22bf7a36
|
@ -270,6 +270,9 @@ class Solr_Reindex extends BuildTask {
|
||||||
|
|
||||||
// If we're in dev mode, commit more often for fun and profit
|
// If we're in dev mode, commit more often for fun and profit
|
||||||
if (Director::isDev()) Solr::service($index)->commit();
|
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');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue