Page MenuHomeIn-Portal Phabricator

D365.id966.diff
No OneTemporary

File Metadata

Created
Wed, Feb 26, 9:05 AM

D365.id966.diff

Index: branches/5.2.x/core/kernel/db/db_load_balancer.php
===================================================================
--- branches/5.2.x/core/kernel/db/db_load_balancer.php
+++ branches/5.2.x/core/kernel/db/db_load_balancer.php
@@ -176,8 +176,8 @@
*/
protected function getSlaveIndex()
{
- if ( count($this->servers) == 1 || $this->Application->isAdmin ) {
- // skip the load balancing if there's only one server OR in admin console
+ if ( count($this->servers) == 1 || $this->Application->isAdmin || defined('CRON') ) {
+ // Skip the load balancing if there's only one server OR in admin console OR in CRON.
return 0;
}
elseif ( $this->slaveIndex !== false ) {

Event Timeline