fix(hlcc): stop archive and log growth

This commit is contained in:
冰朔 2026-08-06 14:01:06 +08:00
commit 0575da8a0d
3 changed files with 10 additions and 3 deletions

View file

@ -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

View file

@ -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)

View file

@ -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);