From dd81dde935665538a5263bc97cf91c8f8f6cbad7 Mon Sep 17 00:00:00 2001 From: Roly Rudy Gutierrez Pinto Date: Mon, 20 Jul 2020 21:15:52 -0400 Subject: [PATCH] PMCORE-1842 Cases are not routed if there is a process that it has Report Table with external connections --- thirdparty/propel/Propel.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/thirdparty/propel/Propel.php b/thirdparty/propel/Propel.php index b1471941f..fb3e5ccb1 100644 --- a/thirdparty/propel/Propel.php +++ b/thirdparty/propel/Propel.php @@ -488,6 +488,13 @@ class Propel * @Description: this was added for the additional database connections * ***********************************************************************/ DbConnections::loadAdditionalConnections(); + //Method "DbConnections::loadAdditionalConnections()" does not work + //well in a multi-threaded environment, its restructuring is quite + //expensive and should be done in another improvement. Forcing the + //load ensures that additional connections are obtained. + if (empty(self::$configuration['datasources'][$name])) { + DbConnections::loadAdditionalConnections(true); + } $dsn = isset(self::$configuration['datasources'][$name]['connection']) ? self::$configuration['datasources'][$name]['connection'] : null; } else { throw new PropelException("No connection params set for " . $name);