Files
dj/integration-work/probe_cleanup_server.py
2026-11-13 11:46:25 +08:00

14 lines
1.2 KiB
Python

import importlib.util,json,pathlib
root=pathlib.Path('/home/ps/huobao-video-cleanup')
spec=importlib.util.spec_from_file_location('cleaner',root/'comfy_video_cleanup.candidate.py');module=importlib.util.module_from_spec(spec);spec.loader.exec_module(module)
workers={'default':'comfyui','gpu1_8189':'comfyui-manju','gpu3':'h3-caption-gpu3-canary-8a5f','gpu1':'huobao-comfy-gpu1'}
results=[]
for receipt in json.loads((root/'readonly-probes.json').read_text()):
try:
manifest=module.docker_python('canvas-h3-prompt-normalizer-healthy-20261026',module.NORMALIZER_CODE,{'mode':'verify',**receipt})
module.docker_python('canvas-h3-prompt-normalizer-healthy-20261026',module.NORMALIZER_CODE,{'mode':'guard','id':receipt['id'],'manifest':manifest})
file=module.docker_python(workers[manifest['provider']],module.WORKER_CODE,{'mode':'inspect','locator':manifest['locator']})
results.append({'task':receipt['localTask'],'provider':manifest['provider'],'downloadChecksumVerified':True,'historyControlReady':True,'sourceBytes':file['bytes'],'deleted':False})
except RuntimeError as error:results.append({'task':receipt['localTask'],'deleted':False,'blocked':str(error)})
print(json.dumps(results));(root/'readonly-probe-result.json').write_text(json.dumps(results,indent=2))