Skip to content

Commit

Permalink
CASMCMS-8754: Disable nodes more intelligently
Browse files Browse the repository at this point in the history
  • Loading branch information
jsollom-hpe committed Oct 3, 2023
1 parent 5d561bf commit 6da619e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/bos/operators/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,11 @@ def _update_database(self, components: List[dict], additional_fields: dict=None)
for component in components:
patch = {
'id': component['id'],
'enabled': component['enabled'], # Enabled state overwrites previous state
'error': component['error'] # New error, or clearing out old error
}
# Allow operators to disable components.
if not component['enabled']:
patch['enabled'] = component['enabled']
if self.name:
last_action_data = {
'action': self.name,
Expand Down

0 comments on commit 6da619e

Please sign in to comment.