Current code in connect method sets up event queue, which requires
registering UI handler. This functionality may not be needed for
some operations, e.g. for server termination.
Moved functionality of setting up event queue in from 'connect'
method to 'setupEventQueue' in BitBakeXMLRPCServerConnection class.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
if not configParams.server_only:
try:
server_connection = server.establishConnection(featureset)
+ server_connection.setupEventQueue()
except Exception as e:
bb.fatal("Could not connect to server %s: %s" % (configParams.remote_server, str(e)))
def terminate(self):
pass
+ def setupEventQueue(self):
+ pass
+
""" BitBakeBaseServer class is the common ancestor to all Bitbake servers
return None
self.transport.set_connection_token(token)
+ return self
+ def setupEventQueue(self):
self.events = uievent.BBUIEventQueue(self.connection, self.clientinfo)
for event in bb.event.ui_queue:
self.events.queue_event(event)
# no need to log it here, the error shall be sent to the client
raise BaseException(error)
- return self
-
def removeClient(self):
if not self.observer_only:
self.connection.removeClient()