diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-08-12 16:54:22 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-08-12 21:42:22 +0100 |
commit | ac2284357f1fc7044dac9c146fad218fc9906412 (patch) | |
tree | 87a64a09982c141db3f6de8149e8b5ed8eac3b57 /lib/bb/server/process.py | |
parent | e56c49717355c9493b07d5fc80981a95ad8a0ec8 (diff) | |
download | bitbake-ac2284357f1fc7044dac9c146fad218fc9906412.tar.gz |
server/process: Pass timeout/xmlrpc parameters directly to the server
Further cleanup, just pass these settings directly.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/server/process.py')
-rw-r--r-- | lib/bb/server/process.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py index a3ef10753..7ee427b51 100644 --- a/lib/bb/server/process.py +++ b/lib/bb/server/process.py @@ -38,7 +38,7 @@ class ProcessServer(): profile_filename = "profile.log" profile_processed_filename = "profile.log.processed" - def __init__(self, lock, sock, sockname): + def __init__(self, lock, sock, sockname, server_timeout, xmlrpcinterface): self.command_channel = False self.command_channel_reply = False self.quit = False @@ -57,6 +57,9 @@ class ProcessServer(): self.sock = sock self.sockname = sockname + self.server_timeout = server_timeout + self.xmlrpcinterface = xmlrpcinterface + def register_idle_function(self, function, data): """Register a function to be called while the server is idle""" assert hasattr(function, '__call__') @@ -466,7 +469,7 @@ class BitBakeServer(object): print(self.start_log_format % (os.getpid(), datetime.datetime.now().strftime(self.start_log_datetime_format))) sys.stdout.flush() - server = ProcessServer(self.bitbake_lock, self.sock, self.sockname) + server = ProcessServer(self.bitbake_lock, self.sock, self.sockname, self.configuration.server_timeout, self.configuration.xmlrpcinterface) os.close(self.readypipe) writer = ConnectionWriter(self.readypipein) try: @@ -476,8 +479,6 @@ class BitBakeServer(object): writer.send("r") writer.close() server.cooker = self.cooker - server.server_timeout = self.configuration.server_timeout - server.xmlrpcinterface = self.configuration.xmlrpcinterface print("Started bitbake server pid %d" % os.getpid()) sys.stdout.flush() |