diff --git a/server-tools/hololake-code-channel/jd-candidate/app.ini b/server-tools/hololake-code-channel/jd-candidate/app.ini index aa394e7..a224a89 100644 --- a/server-tools/hololake-code-channel/jd-candidate/app.ini +++ b/server-tools/hololake-code-channel/jd-candidate/app.ini @@ -9,6 +9,7 @@ PATH = /var/lib/guanghu/personas/guanghu/hlcc-v16.0.1/data/hlcc.db [repository] ROOT = /var/lib/guanghu/personas/guanghu/hlcc-v16.0.1/data/repositories +DISABLE_DOWNLOAD_SOURCE_ARCHIVES = true [server] DOMAIN = guanghulab.com @@ -37,6 +38,10 @@ ENABLED = false [mirror] ENABLED = false +[log] +MODE = console +LEVEL = Warn + [other] SHOW_FOOTER_BRANDING = false SHOW_FOOTER_POWERED_BY = false diff --git a/server-tools/hololake-code-channel/jd-candidate/hlcc-bootstrap.py b/server-tools/hololake-code-channel/jd-candidate/hlcc-bootstrap.py index e411be0..9d21c98 100644 --- a/server-tools/hololake-code-channel/jd-candidate/hlcc-bootstrap.py +++ b/server-tools/hololake-code-channel/jd-candidate/hlcc-bootstrap.py @@ -493,8 +493,6 @@ def bootstrap() -> None: if custom_source.is_dir(): shutil.copytree(custom_source, custom_target, dirs_exist_ok=True) set_status(stage="launching") - log_path = STATE_ROOT / "logs" / "hlcc.log" - log_handle = log_path.open("ab", buffering=0) process = subprocess.Popen( [ str(binary), @@ -504,7 +502,7 @@ def bootstrap() -> None: "--config", str(config_target), ], - stdout=log_handle, + stdout=None, stderr=subprocess.STDOUT, ) wait_for_candidate(process) diff --git a/server-tools/hololake-code-channel/jd-candidate/native.test.js b/server-tools/hololake-code-channel/jd-candidate/native.test.js index 7fc03c4..3b4a552 100644 --- a/server-tools/hololake-code-channel/jd-candidate/native.test.js +++ b/server-tools/hololake-code-channel/jd-candidate/native.test.js @@ -65,10 +65,14 @@ assert.match( ); assert.match(ini, /APP_NAME = 光湖代码频道/); assert.match(ini, /ROOT_URL = https:\/\/guanghulab\.com\/code\//); +assert.match(ini, /\[repository\][\s\S]*DISABLE_DOWNLOAD_SOURCE_ARCHIVES = true/); assert.match(ini, /REQUIRE_SIGNIN_VIEW = false/); +assert.match(ini, /\[log\][\s\S]*MODE = console[\s\S]*LEVEL = Warn/); assert.match(ini, /SHOW_FOOTER_BRANDING = false/); assert.match(ini, /SHOW_FOOTER_VERSION = false/); assert.match(ini, /\[cron\.update_checker\][\s\S]*ENABLED = false/); +assert.match(bootstrap, /stdout=None/); +assert.doesNotMatch(bootstrap, /hlcc\.log|log_path\.open/); assert.match(unit, /^User=guanghu$/m); assert.match(unit, /^ProtectSystem=strict$/m); assert.match(unit, /^ReadOnlyPaths=__RELEASE_ROOT__$/m);