Merge "Make server spawn and response times configurable"
This commit is contained in:
commit
3ce2501ca1
@ -50,7 +50,7 @@ class ZmqClient(object):
|
|||||||
and `rows` attributes pointing to lists of cell values.
|
and `rows` attributes pointing to lists of cell values.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
SERVER_TIMEOUT = 5000 # milliseconds
|
SERVER_TIMEOUT = CONF['default']['server_response_timeout']
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def to_dict(obj):
|
def to_dict(obj):
|
||||||
@ -114,7 +114,7 @@ class ZmqClient(object):
|
|||||||
vbmcd.main([])
|
vbmcd.main([])
|
||||||
|
|
||||||
# TODO(etingof): perform some more retries
|
# TODO(etingof): perform some more retries
|
||||||
time.sleep(3)
|
time.sleep(CONF['default']['server_spawn_wait'] / 1000.)
|
||||||
|
|
||||||
# MQ will deliver the original message to the daemon
|
# MQ will deliver the original message to the daemon
|
||||||
# we've started
|
# we've started
|
||||||
|
@ -42,6 +42,8 @@ class VirtualBMCConfig(object):
|
|||||||
os.path.expanduser('~'), '.vbmc', 'master.pid'
|
os.path.expanduser('~'), '.vbmc', 'master.pid'
|
||||||
),
|
),
|
||||||
'server_port': 50891,
|
'server_port': 50891,
|
||||||
|
'server_response_timeout': 5000, # milliseconds
|
||||||
|
'server_spawn_wait': 3000, # milliseconds
|
||||||
},
|
},
|
||||||
'log': {
|
'log': {
|
||||||
'logfile': None,
|
'logfile': None,
|
||||||
|
@ -33,7 +33,9 @@ class VirtualBMCConfigTestCase(base.TestCase):
|
|||||||
self.config_dict = {'default': {'show_passwords': 'true',
|
self.config_dict = {'default': {'show_passwords': 'true',
|
||||||
'config_dir': '/foo/bar/1',
|
'config_dir': '/foo/bar/1',
|
||||||
'pid_file': '/foo/bar/2',
|
'pid_file': '/foo/bar/2',
|
||||||
'server_port': '12345'},
|
'server_port': '12345',
|
||||||
|
'server_spawn_wait': 3000,
|
||||||
|
'server_response_timeout': 5000},
|
||||||
'log': {'debug': 'true', 'logfile': '/foo/bar/4'},
|
'log': {'debug': 'true', 'logfile': '/foo/bar/4'},
|
||||||
'ipmi': {'session_timeout': '30'}}
|
'ipmi': {'session_timeout': '30'}}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user