From 3db2c9c199bb6253c9d6d4f0d5841ad8fbd8f9b5 Mon Sep 17 00:00:00 2001 From: Daniel Shields Date: Sun, 11 Dec 2022 12:52:38 -0600 Subject: [PATCH] update --- src/uberjob/progress/_simple_progress_observer.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/uberjob/progress/_simple_progress_observer.py b/src/uberjob/progress/_simple_progress_observer.py index 8b653a6..eaa1c8a 100644 --- a/src/uberjob/progress/_simple_progress_observer.py +++ b/src/uberjob/progress/_simple_progress_observer.py @@ -84,7 +84,7 @@ class State: def __init__(self, start_time): self.section_scope_mapping = {} self.running_count = 0 - self._running_section_scopes = set() + self._running_scope_states = set() self._prev_time = start_time def increment_total(self, section, scope, amount: int): @@ -95,7 +95,7 @@ def increment_total(self, section, scope, amount: int): def increment_running(self, section, scope): self.update_weighted_elapsed() scope_state = self.section_scope_mapping[section][scope] - self._running_section_scopes.add(scope_state) + self._running_scope_states.add(scope_state) scope_state.running += 1 self.running_count += 1 @@ -105,7 +105,7 @@ def increment_completed(self, section, scope): scope_state.running -= 1 self.running_count -= 1 if not scope_state.running: - self._running_section_scopes.remove(scope_state) + self._running_scope_states.remove(scope_state) scope_state.completed += 1 def increment_failed(self, section, scope): @@ -114,7 +114,7 @@ def increment_failed(self, section, scope): scope_state.running -= 1 self.running_count -= 1 if not scope_state.running: - self._running_section_scopes.remove(scope_state) + self._running_scope_states.remove(scope_state) scope_state.failed += 1 def update_weighted_elapsed(self): @@ -122,7 +122,7 @@ def update_weighted_elapsed(self): if self.running_count: elapsed = t - self._prev_time multiplier = elapsed / self.running_count - for scope_state in self._running_section_scopes: + for scope_state in self._running_scope_states: scope_state.weighted_elapsed += scope_state.running * multiplier self._prev_time = t