const { Client } = require('pg');
require('dotenv').config({ path: '/root/miaojingAI/.env.local' });
const c = new Client({ connectionString: process.env.LOCAL_DB_URL });
(async () => {
  await c.connect();
  const r = await c.query(`select id, payload from generation_jobs order by created_at desc limit 3`);
  for (const row of r.rows) { console.log('---', row.id); console.log(JSON.stringify(row.payload).slice(0, 1200)); }
  await c.end();
})().catch(e => { console.error(e); process.exit(1); });
