- Add backend stale process monitoring API (/api/stale-processes) - Add users management route - Add frontend landing page and stale process monitor UI on /scraper-tools - Move old development scripts to backend/archive/ - Update frontend build with new features 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
24 lines
585 B
TypeScript
24 lines
585 B
TypeScript
import { pool } from './src/db/migrate.js';
|
|
|
|
async function main() {
|
|
const result = await pool.query(`
|
|
SELECT id, brand_name, status, products_scraped
|
|
FROM brand_jobs
|
|
WHERE dispensary_id = 112
|
|
AND status = 'completed'
|
|
ORDER BY products_scraped DESC
|
|
LIMIT 10
|
|
`);
|
|
|
|
console.log('\nCompleted Brand Jobs:');
|
|
console.log('='.repeat(80));
|
|
result.rows.forEach((row: any) => {
|
|
console.log(`${row.id}: ${row.brand_name} - ${row.products_scraped} products`);
|
|
});
|
|
console.log('='.repeat(80) + '\n');
|
|
|
|
await pool.end();
|
|
}
|
|
|
|
main().catch(console.error);
|