Enable external debugger
This commit is contained in:
parent
66d687d9f0
commit
366f496ba3
@ -24,7 +24,8 @@ def main():
|
|||||||
batchWorker,
|
batchWorker,
|
||||||
debug=cli.getLogLevel() > 0,
|
debug=cli.getLogLevel() > 0,
|
||||||
port=cli.getPort(),
|
port=cli.getPort(),
|
||||||
showOnlyFinalists=not cli.showAllParticipants()
|
showOnlyFinalists=not cli.showAllParticipants(),
|
||||||
|
externalDebugger=cli.externalDebugger
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
combinedData = batchWorker.run(
|
combinedData = batchWorker.run(
|
||||||
|
@ -22,6 +22,8 @@ class Cli:
|
|||||||
debugpy.listen(5678)
|
debugpy.listen(5678)
|
||||||
debugpy.wait_for_client()
|
debugpy.wait_for_client()
|
||||||
|
|
||||||
|
self.externalDebugger = self.__args.debug
|
||||||
|
|
||||||
map = {
|
map = {
|
||||||
0: logging.ERROR,
|
0: logging.ERROR,
|
||||||
1: logging.WARN,
|
1: logging.WARN,
|
||||||
|
@ -8,7 +8,8 @@ def startFlask(
|
|||||||
batchWorker: solo_turnier.batch.BatchWorker,
|
batchWorker: solo_turnier.batch.BatchWorker,
|
||||||
debug: bool = False,
|
debug: bool = False,
|
||||||
port: int = 8082,
|
port: int = 8082,
|
||||||
showOnlyFinalists: bool = True
|
showOnlyFinalists: bool = True,
|
||||||
|
externalDebugger: bool = False,
|
||||||
):
|
):
|
||||||
app = flask.Flask(__name__)
|
app = flask.Flask(__name__)
|
||||||
|
|
||||||
@ -27,4 +28,5 @@ def startFlask(
|
|||||||
)
|
)
|
||||||
return flask.Response(ret, mimetype='text/css')
|
return flask.Response(ret, mimetype='text/css')
|
||||||
|
|
||||||
app.run(host='0.0.0.0', port=port, debug=debug)
|
useReloader = debug and not externalDebugger
|
||||||
|
app.run(host='0.0.0.0', port=port, debug=debug, use_reloader=useReloader)
|
||||||
|
Loading…
Reference in New Issue
Block a user