Explorer
/proc/127/root/tmp/aa043_p30_schema.py
← Zurück ↓ Download
import sqlite3,json
DB='/opt/struktur/youtube-research/knowledge.db'
c=sqlite3.connect('file:'+DB+'?mode=ro',uri=True); c.row_factory=sqlite3.Row
for name in ['videos','e2e_jobs','e2e_rejections','transcript_segments']:
 print(name, c.execute("select sql from sqlite_master where type='table' and name=?",(name,)).fetchone()[0])
print('indexes', [dict(r) for r in c.execute("select name,sql from sqlite_master where type='index' and tbl_name='e2e_jobs'")])
print('queued', [dict(r) for r in c.execute("select job_id,video_id,youtube_id,status,step,attempts,priority,updated_at from e2e_jobs where status='queued' order by priority,job_id limit 10")])
print('status consumers')
for p in ['/opt/struktur/youtube-research/e2e_worker.py','/opt/struktur/youtube-research/db.py','/opt/struktur/youtube-research/app.py','/opt/struktur/youtube-research/e2e_validator.py']:
 print('\nFILE',p)
 try:
  for i,line in enumerate(open(p,errors='ignore'),1):
   if any(x in line for x in ['supadata_','local_transcript','blocked_transcript','e2e_jobs','transcript_status']): print(f'{i}:{line.rstrip()[:400]}')
 except Exception as e: print(e)