_tmp_queue_snapshot.py 464 B

1234567891011121314151617
  1. from apply_sql_file import connect
  2. conn = connect()
  3. try:
  4. with conn.cursor() as cur:
  5. cur.execute(
  6. """
  7. SELECT id, tenant_id, module_code, status, current_stage, heartbeat_at
  8. FROM ado_module_dashboard_rebuild_job
  9. WHERE status IN ('QUEUED','RUNNING','FAILED') AND id>=9113
  10. ORDER BY id
  11. """
  12. )
  13. for row in cur.fetchall():
  14. print(row)
  15. finally:
  16. conn.close()