Files

17 lines
574 B
Python

import sqlite3
import os
DB_PATH = "/app/connector_queue.db"
if __name__ == "__main__":
print(f"📊 Accessing database at {DB_PATH}")
print("📊 Listing last 20 jobs in database...")
with sqlite3.connect(DB_PATH) as conn:
conn.row_factory = sqlite3.Row
cursor = conn.cursor()
cursor.execute("SELECT id, status, event_type, updated_at FROM jobs ORDER BY id DESC LIMIT 20")
rows = cursor.fetchall()
for r in rows:
print(f" - Job {r['id']}: {r['status']} ({r['event_type']}) - Updated: {r['updated_at']}")