Files
cannaiq/backend/archive/check-enrichment-progress.ts
Kelly d91c55a344 feat: Add stale process monitor, users route, landing page, archive old scripts
- 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>
2025-12-05 04:07:31 -07:00

26 lines
704 B
TypeScript

import { pool } from './src/db/migrate.js';
async function main() {
const result = await pool.query(`
SELECT
COUNT(*) as total,
COUNT(regular_price) as with_prices,
COUNT(*) - COUNT(regular_price) as without_prices
FROM products
WHERE dispensary_id = 112
`);
const stats = result.rows[0];
const pct = ((parseInt(stats.with_prices) / parseInt(stats.total)) * 100).toFixed(1);
console.log('\nENRICHMENT PROGRESS:');
console.log(` Total products: ${stats.total}`);
console.log(` With prices: ${stats.with_prices} (${pct}%)`);
console.log(` Without prices: ${stats.without_prices}`);
console.log('');
await pool.end();
}
main().catch(console.error);