summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-08-12 16:54:22 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-08-13 08:07:00 +0100
commitb4919c7ad70a4c293c4e4431f6faaeedf09501ba (patch)
treebfdfeff49360473508843f21f943a735421bb667
parenta3448ad15ec811bbf64aaf5d6496356d26516dfa (diff)
downloadpoky-b4919c7ad70a4c293c4e4431f6faaeedf09501ba.tar.gz
bitbake: server/process: Pass timeout/xmlrpc parameters directly to the server
Further cleanup, just pass these settings directly. (Bitbake rev: ac2284357f1fc7044dac9c146fad218fc9906412) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/server/process.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index a3ef10753d..7ee427b51c 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -38,7 +38,7 @@ class ProcessServer():
38 profile_filename = "profile.log" 38 profile_filename = "profile.log"
39 profile_processed_filename = "profile.log.processed" 39 profile_processed_filename = "profile.log.processed"
40 40
41 def __init__(self, lock, sock, sockname): 41 def __init__(self, lock, sock, sockname, server_timeout, xmlrpcinterface):
42 self.command_channel = False 42 self.command_channel = False
43 self.command_channel_reply = False 43 self.command_channel_reply = False
44 self.quit = False 44 self.quit = False
@@ -57,6 +57,9 @@ class ProcessServer():
57 self.sock = sock 57 self.sock = sock
58 self.sockname = sockname 58 self.sockname = sockname
59 59
60 self.server_timeout = server_timeout
61 self.xmlrpcinterface = xmlrpcinterface
62
60 def register_idle_function(self, function, data): 63 def register_idle_function(self, function, data):
61 """Register a function to be called while the server is idle""" 64 """Register a function to be called while the server is idle"""
62 assert hasattr(function, '__call__') 65 assert hasattr(function, '__call__')
@@ -466,7 +469,7 @@ class BitBakeServer(object):
466 print(self.start_log_format % (os.getpid(), datetime.datetime.now().strftime(self.start_log_datetime_format))) 469 print(self.start_log_format % (os.getpid(), datetime.datetime.now().strftime(self.start_log_datetime_format)))
467 sys.stdout.flush() 470 sys.stdout.flush()
468 471
469 server = ProcessServer(self.bitbake_lock, self.sock, self.sockname) 472 server = ProcessServer(self.bitbake_lock, self.sock, self.sockname, self.configuration.server_timeout, self.configuration.xmlrpcinterface)
470 os.close(self.readypipe) 473 os.close(self.readypipe)
471 writer = ConnectionWriter(self.readypipein) 474 writer = ConnectionWriter(self.readypipein)
472 try: 475 try:
@@ -476,8 +479,6 @@ class BitBakeServer(object):
476 writer.send("r") 479 writer.send("r")
477 writer.close() 480 writer.close()
478 server.cooker = self.cooker 481 server.cooker = self.cooker
479 server.server_timeout = self.configuration.server_timeout
480 server.xmlrpcinterface = self.configuration.xmlrpcinterface
481 print("Started bitbake server pid %d" % os.getpid()) 482 print("Started bitbake server pid %d" % os.getpid())
482 sys.stdout.flush() 483 sys.stdout.flush()
483 484