mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-21 21:57:26 +02:00
add nothreading arg to archivebox server for perf profiling
This commit is contained in:
@@ -38,6 +38,11 @@ def main(args: Optional[List[str]]=None, stdin: Optional[IO]=None, pwd: Optional
|
|||||||
action='store_true',
|
action='store_true',
|
||||||
help='Enable DEBUG=True mode with more verbose errors',
|
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(
|
parser.add_argument(
|
||||||
'--init',
|
'--init',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
@@ -57,7 +62,7 @@ def main(args: Optional[List[str]]=None, stdin: Optional[IO]=None, pwd: Optional
|
|||||||
reject_stdin(__command__, stdin)
|
reject_stdin(__command__, stdin)
|
||||||
|
|
||||||
server(
|
server(
|
||||||
runserver_args=command.runserver_args,
|
runserver_args=command.runserver_args + (['--nothreading'] if command.nothreading else []),
|
||||||
reload=command.reload,
|
reload=command.reload,
|
||||||
debug=command.debug,
|
debug=command.debug,
|
||||||
init=command.init,
|
init=command.init,
|
||||||
|
Reference in New Issue
Block a user