Skip to content

Commit

Permalink
In EnableGroup, StandbyGroup, and OfflineGroup move implementation of…
Browse files Browse the repository at this point in the history
… the ignore feature to the `configure` method
  • Loading branch information
MarcoRocchietti committed Dec 18, 2024
1 parent d8af3e8 commit 96123ac
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
5 changes: 2 additions & 3 deletions python/lsst/ts/standardscripts/enable_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,13 @@ def components():

async def configure(self, config):
self.config = config
if hasattr(config, "ignore"):
self.group.disable_checks_for_components(components=config.ignore)

def set_metadata(self, metadata):
metadata.duration = 60.0

async def run(self):
if hasattr(self.config, "ignore"):
self.group.disable_checks_for_components(components=self.config.ignore)

overrides = (
dict([(comp, getattr(self.config, comp, "")) for comp in self.components()])
if self.config is not None
Expand Down
5 changes: 2 additions & 3 deletions python/lsst/ts/standardscripts/offline_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,11 @@ def get_schema(cls):

async def configure(self, config):
self.config = config
if hasattr(config, "ignore"):
self.group.disable_checks_for_components(components=config.ignore)

def set_metadata(self, metadata):
metadata.duration = 60.0

async def run(self):
if hasattr(self.config, "ignore"):
self.group.disable_checks_for_components(self.config.ignore)

await self.group.offline()
5 changes: 2 additions & 3 deletions python/lsst/ts/standardscripts/standby_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,11 @@ def get_schema(cls):

async def configure(self, config):
self.config = config
if hasattr(config, "ignore"):
self.group.disable_checks_for_components(components=config.ignore)

def set_metadata(self, metadata):
metadata.duration = 60.0

async def run(self):
if hasattr(self.config, "ignore"):
self.group.disable_checks_for_components(components=self.config.ignore)

await self.group.standby()

0 comments on commit 96123ac

Please sign in to comment.