11 lines
568 B
Python
11 lines
568 B
Python
import subprocess
|
|
for name in ('huobao-comfy-gpu1','comfyui','h3-caption-gpu3-canary-8a5f'):
|
|
code="""from pathlib import Path
|
|
for p in [Path('/app/server.py'), *Path('/app/app').rglob('*.py'), *Path('/app/custom_nodes/ComfyUI-H3CaptionPipeline').rglob('*.py')]:
|
|
s=p.read_text(errors='replace'); lines=s.splitlines()
|
|
for i,line in enumerate(lines):
|
|
if '/cancel' in line and ('route' in line or 'jobs' in line):
|
|
print(str(p), '\\n'.join(lines[max(0,i-3):i+55]))
|
|
"""
|
|
print(name,subprocess.check_output(['docker','exec',name,'python','-c',code],text=True))
|