/** * LEGACY SCHEDULER - DEPRECATED 2024-12-10 * * DO NOT USE THIS FILE. * * Per TASK_WORKFLOW_2024-12-10.md: * This node-cron scheduler has been replaced by the database-driven * task scheduler in src/services/task-scheduler.ts * * The new scheduler: * - Stores schedules in PostgreSQL (survives restarts) * - Uses SELECT FOR UPDATE SKIP LOCKED (multi-replica safe) * - Creates tasks in worker_tasks table (processed by task-worker.ts) * * This file is kept for reference only. All exports are no-ops. * Legacy code has been removed - see git history for original implementation. */ // 2024-12-10: All functions are now no-ops export async function startScheduler(): Promise { console.warn('[DEPRECATED] startScheduler() called - use taskScheduler from task-scheduler.ts instead'); } export function stopScheduler(): void { console.warn('[DEPRECATED] stopScheduler() called - use taskScheduler from task-scheduler.ts instead'); } export async function restartScheduler(): Promise { console.warn('[DEPRECATED] restartScheduler() called - use taskScheduler from task-scheduler.ts instead'); } export async function triggerStoreScrape(_storeId: number): Promise { console.warn('[DEPRECATED] triggerStoreScrape() called - use taskService.createTask() instead'); } export async function triggerAllStoresScrape(): Promise { console.warn('[DEPRECATED] triggerAllStoresScrape() called - use taskScheduler.triggerSchedule() instead'); }