allow some config options optionally to be set by command line

This commit is contained in:
rofl0r
2019-01-05 04:41:25 +00:00
parent ffbe450aee
commit ff5d121d5f

View File

@@ -19,3 +19,10 @@ def load():
watchd_threads = parser.getint('watcherd', 'threads')
timeout = parser.getint('watcherd', 'timeout')
# allow overriding select items from the commandline
import argparse
aparse = argparse.ArgumentParser()
aparse.add_argument('--watchd_threads', help="how many proxy checker threads to spin up, 0==none, default: 10", type=int, default=watchd_threads, required=False)
args = aparse.parse_args()
watchd_threads = args.watchd_threads