1
0
Fork 0
mirror of synced 2024-06-18 18:34:51 +12:00

add nothreading arg to archivebox server for perf profiling

This commit is contained in:
Nick Sweeting 2021-02-16 15:46:58 -05:00
parent 8cde6bc676
commit 74c882ef16

View file

@ -38,6 +38,11 @@ def main(args: Optional[List[str]]=None, stdin: Optional[IO]=None, pwd: Optional
action='store_true',
help='Enable DEBUG=True mode with more verbose errors',
)
parser.add_argument(
'--nothreading',
action='store_true',
help='Force runserver to run in single-threaded mode',
)
parser.add_argument(
'--init',
action='store_true',
@ -57,7 +62,7 @@ def main(args: Optional[List[str]]=None, stdin: Optional[IO]=None, pwd: Optional
reject_stdin(__command__, stdin)
server(
runserver_args=command.runserver_args,
runserver_args=command.runserver_args + (['--nothreading'] if command.nothreading else []),
reload=command.reload,
debug=command.debug,
init=command.init,