From 4f8bd00fe2c9af231232d7f2e673b63bf1121e72 Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Fri, 3 Nov 2017 16:02:44 +0000 Subject: [PATCH] framework/config: add eanbled processor tracking to JobGenerator Add attributes for tracking enabled processors to JobGenerator (similiar to what already exists for instruments). --- wa/framework/configuration/core.py | 7 +++++++ wa/framework/configuration/execution.py | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/wa/framework/configuration/core.py b/wa/framework/configuration/core.py index e8e2d7cc..f5c542e5 100644 --- a/wa/framework/configuration/core.py +++ b/wa/framework/configuration/core.py @@ -1022,13 +1022,20 @@ class JobGenerator(object): self._read_enabled_instruments = True return self._enabled_instruments + @property + def enabled_processors(self): + self._read_enabled_processors = True + return self._enabled_processors + def __init__(self, plugin_cache): self.plugin_cache = plugin_cache self.ids_to_run = [] self.sections = [] self.workloads = [] self._enabled_instruments = set() + self._enabled_processors = set() self._read_enabled_instruments = False + self._read_enabled_processors = False self.disabled_instruments = [] self.job_spec_template = obj_dict(not_in_dict=['name']) diff --git a/wa/framework/configuration/execution.py b/wa/framework/configuration/execution.py index e568ad34..490df64c 100644 --- a/wa/framework/configuration/execution.py +++ b/wa/framework/configuration/execution.py @@ -45,6 +45,10 @@ class ConfigManager(object): def enabled_instruments(self): return self.jobs_config.enabled_instruments + @property + def enabled_processors(self): + return self.jobs_config.enabled_processors + @property def job_specs(self): if not self._jobs_generated: @@ -96,7 +100,7 @@ class ConfigManager(object): def get_processors(self): processors = [] - for name in self.run_config.result_processors: + for name in self.enabled_processors: try: proc = self.plugin_cache.get_plugin(name, kind='result_processor') except NotFoundError: