1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

modify some shell scripts to make variable references safer; modify some python scripts to reduce the code complexity and cyclomatic complexity of functions.

This commit is contained in:
herengui 2022-08-22 09:57:07 +08:00
parent aaea1d9451
commit 4d78917c35
12 changed files with 164 additions and 262 deletions

View file

@ -75,10 +75,7 @@ backlog = 2048
def get_workers():
procs = os.sysconf('SC_NPROCESSORS_ONLN')
if procs > 0:
return procs * 2 + 1
else:
return 3
return procs * 2 + 1 if procs > 0 else 3
workers = get_workers()