Skip to content

Commit

Permalink
Moved get_dynamic_field() to before timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
assrinivasan committed May 25, 2024
1 parent 7118c91 commit d246ac5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 3 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ parameters:
- name: sensormond
root_dir: sonic-sensormond
python3: true
- name: stormond
root_dir: sonic-stormond
python3: true
- name: artifactBranch
type: string
default: 'refs/heads/master'
Expand Down
7 changes: 3 additions & 4 deletions sonic-stormond/scripts/stormond
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,9 @@ class DaemonStorage(daemon_base.DaemonBase):
# this is to be able to dynamically configure the polling and sync times.
self._get_configdb_intervals()

# Repeatedly read and update Dynamic Fields to the StateDB
self.get_dynamic_fields()

if self.stop_event.wait(self.timeout):
# We received a fatal signal
return False
Expand All @@ -346,10 +349,6 @@ class DaemonStorage(daemon_base.DaemonBase):
if (elapsed_time > self.fsstats_sync_interval) or ((self.fsstats_sync_interval - elapsed_time) < self.timeout):
self._sync_fsio_rw_json()


# Repeatedly read and update Dynamic Fields to the StateDB
self.get_dynamic_fields()

return True
#
# Main =========================================================================
Expand Down

0 comments on commit d246ac5

Please sign in to comment.