diff options
author | nicolargo <nicolashennion@gmail.com> | 2024-04-30 17:02:34 +0200 |
---|---|---|
committer | nicolargo <nicolashennion@gmail.com> | 2024-04-30 17:02:34 +0200 |
commit | e2e2264a4d270a203686822ad7643b13d0b1b2e5 (patch) | |
tree | 9fae44cbff5b24f51261d71b9e1e4eefebc2d78c /glances | |
parent | 3aa6be73619b16da4560ead62204de1d5a274fa6 (diff) |
Set sensor refresh time at Glances refresh * 3
Diffstat (limited to 'glances')
-rw-r--r-- | glances/plugins/sensors/__init__.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/glances/plugins/sensors/__init__.py b/glances/plugins/sensors/__init__.py index adeda67f..35e04678 100644 --- a/glances/plugins/sensors/__init__.py +++ b/glances/plugins/sensors/__init__.py @@ -26,6 +26,11 @@ SENSOR_TEMP_UNIT = 'C' SENSOR_FAN_TYPE = 'fan_speed' SENSOR_FAN_UNIT = 'R' +# Define the default refresh multiplicator +# Default value is 3 * Glances refresh time +# Can be overwritten by the refresh option in the sensors section of the glances.conf file +DEFAULT_REFRESH = 3 + # Fields description # description: human readable description # short_name: shortname to use un UI @@ -96,9 +101,8 @@ class PluginModel(GlancesPluginModel): self.display_curse = True # Not necessary to refresh every refresh time - # By default set to refresh * 2 if self.get_refresh() == args.time: - self.set_refresh(self.get_refresh() * 2) + self.set_refresh(self.get_refresh() * DEFAULT_REFRESH) def get_key(self): """Return the key of the list.""" |