cmd arg to skip initializing google_blockly

new cmd_arg, --skip-google-blockly
This commit is contained in:
Haoming
2024-11-15 20:30:29 +08:00
committed by GitHub
parent 95021aebec
commit 92d6bbaa36
2 changed files with 5 additions and 3 deletions

View File

@@ -15,6 +15,7 @@ parser.add_argument("--update-check", action='store_true', help="launch.py argum
parser.add_argument("--test-server", action='store_true', help="launch.py argument: configure server for testing")
parser.add_argument("--log-startup", action='store_true', help="launch.py argument: print a detailed log of what's happening at startup")
parser.add_argument("--skip-prepare-environment", action='store_true', help="launch.py argument: skip all environment preparation")
parser.add_argument("--skip-google-blockly", action='store_true', help="launch.py argument: do not initialize google blockly modules")
parser.add_argument("--skip-install", action='store_true', help="launch.py argument: skip installation of packages")
parser.add_argument("--dump-sysinfo", action='store_true', help="launch.py argument: dump limited sysinfo file (without information about extensions, options) to disk and quit")
parser.add_argument("--loglevel", type=str, help="log level; one of: CRITICAL, ERROR, WARNING, INFO, DEBUG", default=None)

View File

@@ -133,8 +133,9 @@ def initialize_rest(*, reload_script_modules=False):
extra_networks.register_default_extra_networks()
startup_timer.record("initialize extra networks")
from modules_forge import google_blockly
google_blockly.initialization()
startup_timer.record("initialize google blockly")
if not cmd_opts.skip_google_blockly:
from modules_forge import google_blockly
google_blockly.initialization()
startup_timer.record("initialize google blockly")
return