From 3307a00bd9019e45b864f308af64787df862bf49 Mon Sep 17 00:00:00 2001 From: ribes Date: Wed, 21 Mar 2012 17:01:30 +0000 Subject: [PATCH] Adding new env variable for SALOME: TIMEOUT_TO_LAUNCH_CONTAINER If set to an int, defines how many seconds the SALOME container manager will wait for a container --- src/Container/SALOME_ContainerManager.cxx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/Container/SALOME_ContainerManager.cxx b/src/Container/SALOME_ContainerManager.cxx index 6fdf34836..fb3a1f933 100644 --- a/src/Container/SALOME_ContainerManager.cxx +++ b/src/Container/SALOME_ContainerManager.cxx @@ -34,6 +34,7 @@ #include #include "Utils_CorbaException.hxx" #include +#include #ifdef WNT #include @@ -44,7 +45,7 @@ #include "PaCOPP.hxx" #endif -#define TIME_OUT_TO_LAUNCH_CONT 61 +#define TIME_OUT_TO_LAUNCH_CONT 60 const char *SALOME_ContainerManager::_ContainerManagerNameInNS = "/ContainerManager"; @@ -583,6 +584,18 @@ SALOME_ContainerManager::LaunchContainer(const Engines::ContainerParameters& par { // Step 4: Wait for the container int count = TIME_OUT_TO_LAUNCH_CONT; + if (getenv("TIMEOUT_TO_LAUNCH_CONTAINER") != 0) + { + std::string new_count_str = getenv("TIMEOUT_TO_LAUNCH_CONTAINER"); + int new_count; + std::istringstream ss(new_count_str); + if (!(ss >> new_count)) + { + INFOS("[LaunchContainer] TIMEOUT_TO_LAUNCH_CONTAINER should be an int"); + } + else + count = new_count; + } INFOS("[GiveContainer] waiting " << count << " second steps container " << containerNameInNS); while (CORBA::is_nil(ret) && count) { -- 2.39.2