mirror of
https://github.com/nicolargo/glances.git
synced 2025-01-07 02:20:26 +03:00
Rename export folder to avoid error of the dep lib use inside an export plugin has the same name: for example csv, use the python lib csv...
This commit is contained in:
parent
ae596610ff
commit
24a3aead9d
@ -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)
|
||||
|
||||
|
@ -142,12 +142,6 @@ class GlancesStandalone(object):
|
||||
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
|
||||
@ -164,6 +158,12 @@ class GlancesStandalone(object):
|
||||
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):
|
||||
|
Loading…
Reference in New Issue
Block a user