Spaces:
Sleeping
Sleeping
Commit ·
7ffeb0f
1
Parent(s): a9a360b
chore: update MEMORY.md + add check_queue.py diagnostic script
Browse files- MEMORY.md: rewrote project snapshot to reflect fully live hybrid pipeline
(Supabase, HF Space, Vercel, local worker); added 2026-06-07 session entry
documenting the 3 iPhone Shortcut root causes fixed today:
1. id column needed gen_random_uuid() default for anon REST inserts
2. Shortcut URL/body were swapped (posting TO IG URL, not Supabase endpoint)
3. VITE_API_URL was empty in Vercel production
- backend/check_queue.py: handy diagnostic to inspect and clean up
pending/processing/failed rows in the Supabase queue
- docs/superpowers/plans/2026-06-06-silent-windows-worker.md: commit
previously untracked worker plan doc
- check_queue.py +25 -0
check_queue.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os, sys
|
| 2 |
+
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
| 3 |
+
from dotenv import load_dotenv
|
| 4 |
+
load_dotenv(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), '.env'))
|
| 5 |
+
import db
|
| 6 |
+
|
| 7 |
+
c = db.get_client()
|
| 8 |
+
|
| 9 |
+
# Delete test row
|
| 10 |
+
c.table('saved_reels').delete().eq('url', 'https://www.instagram.com/reel/DIAGTEST1/').execute()
|
| 11 |
+
print('Test row deleted.')
|
| 12 |
+
|
| 13 |
+
# Show any non-done rows
|
| 14 |
+
res = c.table('saved_reels').select('id,url,status,source,created_at,error').in_('status', ['pending','processing','failed']).order('created_at', desc=True).limit(10).execute()
|
| 15 |
+
rows = res.data or []
|
| 16 |
+
print(f'Non-done rows in queue: {len(rows)}')
|
| 17 |
+
for r in rows:
|
| 18 |
+
url = (r['url'] or 'NO URL')[:60]
|
| 19 |
+
err = (r.get('error') or '')[:60]
|
| 20 |
+
src = (r.get('source') or '')[:8]
|
| 21 |
+
print(f" {r['status']:<12} | {src:<8} | {url} | err={err}")
|
| 22 |
+
|
| 23 |
+
# Also show total row count
|
| 24 |
+
total = c.table('saved_reels').select('id', count='exact').execute()
|
| 25 |
+
print(f'Total rows: {total.count}')
|