diff --git a/CHANGELOG b/CHANGELOG index dd97cdf..e8fcc6a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,7 +2,7 @@ - Add ephem to pickle seq & add pickle creation when submitting seq via api - Add Filenames to ConfigPyros & add fn_contexts in config_pyros.yml - Sequence two pickle file : one with ephem & one sequence - + - Add ConfigPyros to Agent.py 06-04-2023 (AKo): v0.6.21.1 - Try to fix error when submitting seq simplified (no start_date) diff --git a/src/core/pyros_django/agent/Agent.py b/src/core/pyros_django/agent/Agent.py index 9a590d3..2e9a5b5 100755 --- a/src/core/pyros_django/agent/Agent.py +++ b/src/core/pyros_django/agent/Agent.py @@ -164,7 +164,7 @@ CmdExceptionExecTimeout = AgentCmd.CmdExceptionExecTimeout #from config.configpyros import ConfigPyros from config.old_config.configpyros import ConfigPyros as ConfigPyrosOld from src.core.pyros_django.obsconfig.obsconfig_class import OBSConfig - +from config.pyros.config_pyros import ConfigPyros as ConfigPyros #from dashboard.views import get_sunelev #from devices.TelescopeRemoteControlDefault import TelescopeRemoteControlDefault @@ -636,7 +636,9 @@ class Agent: path_to_obs_config_folder = os.environ["PATH_TO_OBSCONF_FOLDER"] unit = os.environ["unit_name"] oc = OBSConfig(obs_config_file_path,unit) - self.set_config(oc, obs_config_file_path, path_to_obs_config_folder, unit) + pyros_yaml_path = os.environ["pyros_config_file"] + pyros_config = ConfigPyros(pyros_yaml_path) + self.set_config(oc, obs_config_file_path, path_to_obs_config_folder, unit, pyros_config, pyros_yaml_path) agent_name_from_config = self.get_config().get_agent_name_from_config(self.__class__.__name__,simulated_computer) if agent_name_from_config: self.name = agent_name_from_config @@ -855,13 +857,15 @@ class Agent: - def set_config(self, oc: OBSConfig, obs_config_file_path: str, path_to_obs_config_folder: str, unit: str): + def set_config(self, oc: OBSConfig, obs_config_file_path: str, path_to_obs_config_folder: str, unit: str, pyros_config: str, pyros_yaml_path: str): self._oc = { 'config' : oc, + 'pyros_config' : pyros_config, 'env' : [ obs_config_file_path, path_to_obs_config_folder, - unit + unit, + pyros_yaml_path ] } ''' -- libgit2 0.21.2