chore: update check_job.py to dump full outputs structure
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c32302ad2f
commit
31b7be0a2f
1 changed files with 21 additions and 11 deletions
|
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Check job edit state and placements for debugging render order issues."""
|
||||
import json
|
||||
import sys
|
||||
import os
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "backend"))
|
||||
|
|
@ -11,10 +12,9 @@ from app.core.config import settings
|
|||
|
||||
db = MongoClient(settings.mongodb_uri)[settings.mongodb_db]
|
||||
|
||||
# Both problem jobs
|
||||
job_ids = [
|
||||
"69a0675634e072d880ef7205", # de-v1fv (render not updating)
|
||||
"69a00adb3c66801f7d23fe5b", # de-v2fv (out of order: 0 1 2 3 4 5 8 6 9 10 7)
|
||||
"69a0675634e072d880ef7205", # de-v1fv
|
||||
"69a00adb3c66801f7d23fe5b", # de-v2fv
|
||||
]
|
||||
|
||||
for job_id in job_ids:
|
||||
|
|
@ -31,13 +31,23 @@ for job_id in job_ids:
|
|||
outputs = job.get("outputs", {})
|
||||
for lang, data in outputs.items():
|
||||
print(f"\nLanguage: {lang}")
|
||||
es = data.get("accessible_video_edit_state", {})
|
||||
placements = es.get("placements", [])
|
||||
print(f"Placements ({len(placements)}):")
|
||||
for p in placements:
|
||||
cue = p.get("ad_cue_index", "?")
|
||||
pp = p.get("pause_point", 0)
|
||||
text = p.get("ad_text", "")[:60]
|
||||
print(f" cue={cue:>2} pause_point={pp:>8.3f} {text}")
|
||||
print(f"Keys: {list(data.keys())}")
|
||||
# Print full outputs structure (truncate large values)
|
||||
for key, val in data.items():
|
||||
if isinstance(val, dict):
|
||||
print(f"\n {key}:")
|
||||
for k2, v2 in val.items():
|
||||
if isinstance(v2, list) and len(v2) > 0:
|
||||
print(f" {k2}: [{len(v2)} items]")
|
||||
for item in v2:
|
||||
if isinstance(item, dict):
|
||||
summary = {k: (str(v)[:60] if isinstance(v, str) else v) for k, v in item.items()}
|
||||
print(f" {summary}")
|
||||
else:
|
||||
print(f" {k2}: {str(v2)[:100]}")
|
||||
elif isinstance(val, str) and len(val) > 100:
|
||||
print(f" {key}: {val[:100]}...")
|
||||
else:
|
||||
print(f" {key}: {val}")
|
||||
|
||||
print()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue