mirror of
https://github.com/nicolargo/glances.git
synced 2025-01-04 16:03:52 +03:00
Merge branch 'develop' of https://github.com/nicolargo/glances into develop
This commit is contained in:
commit
7edb99923a
@ -35,7 +35,7 @@ from glances import __version__
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
#extensions = ['sphinxcontrib.autohttp.bottle']
|
||||
extensions = []
|
||||
extensions = ['sphinx.ext.intersphinx']
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
BIN
docs/objects.inv
Normal file
BIN
docs/objects.inv
Normal file
Binary file not shown.
@ -167,6 +167,10 @@ class Plugin(GlancesPlugin):
|
||||
except Exception as e:
|
||||
# Correct issue#649
|
||||
logger.error("{} plugin - Cannot get Docker version ({})".format(self.plugin_name, e))
|
||||
# We may have lost connection remove version info
|
||||
if 'version' in self.stats:
|
||||
del self.stats['version']
|
||||
self.stats['containers'] = []
|
||||
return self.stats
|
||||
|
||||
# Update current containers list
|
||||
@ -176,6 +180,8 @@ class Plugin(GlancesPlugin):
|
||||
containers = self.docker_client.containers.list(all=self._all_tag()) or []
|
||||
except Exception as e:
|
||||
logger.error("{} plugin - Cannot get containers list ({})".format(self.plugin_name, e))
|
||||
# We may have lost connection empty the containers list.
|
||||
self.stats['containers'] = []
|
||||
return self.stats
|
||||
|
||||
# Start new thread for new container
|
||||
@ -653,11 +659,15 @@ class ThreadDockerGrabber(threading.Thread):
|
||||
|
||||
Infinite loop, should be stopped by calling the stop() method
|
||||
"""
|
||||
for i in self._stats_stream:
|
||||
self._stats = i
|
||||
time.sleep(0.1)
|
||||
if self.stopped():
|
||||
break
|
||||
try:
|
||||
for i in self._stats_stream:
|
||||
self._stats = i
|
||||
time.sleep(0.1)
|
||||
if self.stopped():
|
||||
break
|
||||
except:
|
||||
logger.debug("docker plugin - Exception thrown during run")
|
||||
self.stop()
|
||||
|
||||
@property
|
||||
def stats(self):
|
||||
|
Loading…
Reference in New Issue
Block a user