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>
This commit is contained in:
25
backend/archive/check-enrichment-progress.ts
Normal file
25
backend/archive/check-enrichment-progress.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
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);
|
||||
Reference in New Issue
Block a user