Skip to content

Commit

Permalink
Rename export folder to avoid error of the dep lib use inside an expo…
Browse files Browse the repository at this point in the history
…rt plugin has the same name: for example csv, use the python lib csv...
  • Loading branch information
nicolargo committed Mar 30, 2024
1 parent ae59661 commit 24a3aea
Show file tree
Hide file tree
Showing 20 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion glances/exports/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class GlancesExport(object):

def __init__(self, config=None, args=None):
"""Init the export class."""
# Export name (= module name without glances_)
# Export name
self.export_name = self.__class__.__module__
logger.debug("Init export module %s" % self.export_name)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions glances/standalone.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,6 @@ def __serve_once(self):
self.stats.update()
logger.debug('Stats updated duration: {} seconds'.format(counter.get()))

# Export stats
# Start a counter used to compute the time needed
counter_export = Counter()
self.stats.export(self.stats)
logger.debug('Stats exported duration: {} seconds'.format(counter_export.get()))

# Patch for issue1326 to avoid < 0 refresh
adapted_refresh = self.refresh_time - counter.get()
adapted_refresh = adapted_refresh if adapted_refresh > 0 else 0
Expand All @@ -164,6 +158,12 @@ def __serve_once(self):
time.sleep(adapted_refresh)
ret = True

# Export stats
# Start a counter used to compute the time needed
counter_export = Counter()
self.stats.export(self.stats)
logger.debug('Stats exported duration: {} seconds'.format(counter_export.get()))

return ret

def serve_n(self, n=1):
Expand Down

0 comments on commit 24a3aea

Please sign in to comment.