fix: Remove legacy imports from task handlers
- Remove non-existent DutchieClient import from product-resync and entry-point-discovery - Remove non-existent DiscoveryCrawler import from store-discovery - Use scrapeStore from scraper-v2 for product resync - Use discoverState from discovery module for store discovery - Fix Pool type by using getPool() instead of pool wrapper - Update FullDiscoveryResult property access to use correct field names 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
import { Pool } from 'pg';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { taskService, TaskRole, WorkerTask } from './task-service';
|
||||
import { pool } from '../db/pool';
|
||||
import { getPool } from '../db/pool';
|
||||
|
||||
// Task handlers by role
|
||||
import { handleProductResync } from './handlers/product-resync';
|
||||
@@ -64,7 +64,7 @@ export class TaskWorker {
|
||||
private currentTask: WorkerTask | null = null;
|
||||
|
||||
constructor(role: TaskRole, workerId?: string) {
|
||||
this.pool = pool;
|
||||
this.pool = getPool();
|
||||
this.role = role;
|
||||
this.workerId = workerId || `worker-${role}-${uuidv4().slice(0, 8)}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user