[oe-commits] [bitbake] 04/04: main: Handle BB_SERVER_TIMEOUT = -1 for no server timeout
git at git.openembedded.org
git at git.openembedded.org
Tue Aug 8 12:16:35 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository bitbake.
commit 923d5567be6fd9969ca74c166f36817ec09305e3
Author: Robert Yang <liezhi.yang at windriver.com>
AuthorDate: Tue Aug 8 02:12:08 2017 -0700
main: Handle BB_SERVER_TIMEOUT = -1 for no server timeout
Make BB_SERVER_TIMEOUT = -1 mean no unload forever.
Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/main.py | 6 ++++--
lib/bb/server/process.py | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/lib/bb/main.py b/lib/bb/main.py
index eba4aef..0418d52 100755
--- a/lib/bb/main.py
+++ b/lib/bb/main.py
@@ -259,8 +259,10 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters):
help="The name/address for the bitbake xmlrpc server to bind to.")
parser.add_option("-T", "--idle-timeout", type=float, dest="server_timeout",
- default=os.environ.get("BB_SERVER_TIMEOUT", 0) or None,
- help="Set timeout to unload bitbake server due to inactivity")
+ default=os.getenv("BB_SERVER_TIMEOUT"),
+ help="Set timeout to unload bitbake server due to inactivity, "
+ "set to -1 means no unload, "
+ "default: Environment variable BB_SERVER_TIMEOUT.")
parser.add_option("", "--no-setscene", action="store_true",
dest="nosetscene", default=False,
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index 5b8a549..338c448 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -180,7 +180,8 @@ class ProcessServer(multiprocessing.Process):
if self.timeout is None:
print("No timeout, exiting.")
self.quit = True
- if not self.haveui and self.lastui and self.timeout and (self.lastui + self.timeout) < time.time():
+ if not self.timeout == -1.0 and not self.haveui and self.lastui and self.timeout and \
+ (self.lastui + self.timeout) < time.time():
print("Server timeout, exiting.")
self.quit = True
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list