feat(platform): expose multi-source vehicle evidence

This commit is contained in:
lingniu
2026-07-16 16:35:04 +08:00
parent 196cfa018f
commit 17c4591040
21 changed files with 1129 additions and 11 deletions

View File

@@ -29,6 +29,12 @@ def main():
raise SystemExit('protected release is outside the release root: {}'.format(path))
protected.add(path)
metadata_removed = 0
for path in releases.iterdir():
if path.is_file() and path.name.startswith('._'):
path.unlink()
metadata_removed += 1
candidates = [path.resolve() for path in releases.iterdir() if path.is_dir() and not path.is_symlink()]
candidates.sort(key=lambda path: path.stat().st_mtime, reverse=True)
keep = set(protected)
@@ -46,7 +52,9 @@ def main():
shutil.rmtree(str(path))
removed += 1
print('release_prune=ok before={} kept={} removed={}'.format(len(candidates), len(keep), removed))
print('release_prune=ok before={} kept={} removed={} metadata_removed={}'.format(
len(candidates), len(keep), removed, metadata_removed
))
if __name__ == '__main__':