Change worker Gearman function name format.
Fixes bug #1076478 Now use the format 'lbaas-VERSION-HOSTNAME' where VERSION is the JSON message format version that the worker understands, and HOSTNAME is the hostname of the local machine. The hostname is supposed to be a unique UUID value, but any unique value will work, actually. Change-Id: I0ca14d95c11838575defce599d190914bca88998
This commit is contained in:
parent
16795aac6f
commit
a07f2c3aff
@ -48,8 +48,13 @@ def handler(worker, job):
|
||||
|
||||
|
||||
def config_manager(logger, driver, servers, reconnect_sleep):
|
||||
my_ip = socket.gethostbyname(socket.gethostname())
|
||||
task_name = "lbaas-%s" % my_ip
|
||||
# Version of the JSON message format that this worker understands.
|
||||
msg_fmt_version = "1.0"
|
||||
|
||||
# Hostname should be a unique value, like UUID
|
||||
hostname = socket.gethostname()
|
||||
|
||||
task_name = "lbaas-%s-%s" % (msg_fmt_version, hostname)
|
||||
logger.info("[worker] Registering task %s" % task_name)
|
||||
|
||||
worker = CustomJSONGearmanWorker(servers)
|
||||
|
Loading…
x
Reference in New Issue
Block a user