For for stats thread when haproxy not running.

Fixes bug #1078773

The worker stats thread now checks to see if haproxy is running
before attempting to get stats from it. If it isn't running, a
ServiceUnavailable exception is thrown and it goes back to sleep
until the next polling interval.

Also rename config_manager and stats_manager functions to
config_thread and stats_thread to make their purpose a bit clearer.

Change-Id: I01e2c86bcac81a00027d4a7201feb922c6e72f3b
This commit is contained in:
David Shrewsbury
2012-11-14 15:05:40 -05:00
parent ca5445b3c5
commit cc7f07dc3b
6 changed files with 47 additions and 14 deletions

View File

@@ -47,7 +47,8 @@ def handler(worker, job):
return response
def config_manager(logger, driver, servers, reconnect_sleep):
def config_thread(logger, driver, servers, reconnect_sleep):
""" Worker thread function. """
# Version of the JSON message format that this worker understands.
msg_fmt_version = "1.0"