mirror of
https://github.com/nicolargo/glances.git
synced 2025-01-04 07:34:49 +03:00
Add time sleep between server start and server announce
This commit is contained in:
parent
d902730b5d
commit
1e63e23e77
@ -102,7 +102,7 @@ class GlancesClientBrowser(object):
|
||||
logger.warning(
|
||||
_("Can not grab stats form {0}: {1}").format(uri, e))
|
||||
except RuntimeError:
|
||||
logger.debug(_("Server list dictionnary chenge inside the loop (wait next update)"))
|
||||
logger.debug(_("Server list dictionnary change inside the loop (wait next update)"))
|
||||
|
||||
# Update the screen
|
||||
self.screen.update_browser(self.get_servers_list())
|
||||
|
@ -23,6 +23,7 @@
|
||||
import json
|
||||
import socket
|
||||
import sys
|
||||
import time
|
||||
from base64 import b64decode
|
||||
try:
|
||||
from xmlrpc.server import SimpleXMLRPCRequestHandler
|
||||
@ -215,7 +216,8 @@ class GlancesServer(object):
|
||||
self.server.register_introspection_functions()
|
||||
self.server.register_instance(GlancesInstance(cached_time, config))
|
||||
|
||||
# Announce the server to the network
|
||||
# Announce the server to the network (wait 1 seond before do this)
|
||||
time.sleep(1)
|
||||
if not self.args.disable_autodiscover:
|
||||
# Note: The Zeroconf service name will be based on the hostname
|
||||
self.autodiscover_client = GlancesAutoDiscoverClient(socket.gethostname(), args)
|
||||
|
@ -111,13 +111,13 @@ class Plugin(GlancesPlugin):
|
||||
self.stats['os_name'] = self.stats['system_name']
|
||||
# Windows OS tips
|
||||
if self.get_short_system_name() == 'windows':
|
||||
for r,v in snmp_to_human['windows'].iteritems():
|
||||
for r, v in snmp_to_human['windows'].iteritems():
|
||||
if re.search(r, self.stats['system_name']):
|
||||
self.stats['os_name'] = v
|
||||
self.stats['os_name'] = v
|
||||
break
|
||||
# Add human readable name
|
||||
self.stats['hr_name'] = self.stats['os_name']
|
||||
|
||||
|
||||
return self.stats
|
||||
|
||||
def msg_curse(self, args=None):
|
||||
|
Loading…
Reference in New Issue
Block a user