more testing and queue work
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 5m39s

This commit is contained in:
2025-12-07 11:52:36 -08:00
parent 51e2874bab
commit eec0967c94
17 changed files with 1591 additions and 1288 deletions

View File

@@ -19,7 +19,9 @@ import gamificationRouter from './src/routes/gamification.routes';
import systemRouter from './src/routes/system.routes';
import healthRouter from './src/routes/health.routes';
import { errorHandler } from './src/middleware/errorHandler';
import { startBackgroundJobs } from './src/services/backgroundJobService';
import { backgroundJobService, startBackgroundJobs } from './src/services/backgroundJobService.ts';
import * as db from './src/services/db/index.db';
import { analyticsQueue, gracefulShutdown } from './src/services/queueService.server';
// --- START DEBUG LOGGING ---
// Log the database connection details as seen by the SERVER PROCESS.
@@ -146,7 +148,11 @@ if (process.env.NODE_ENV !== 'test') {
});
// Start the scheduled background jobs
startBackgroundJobs();
startBackgroundJobs(backgroundJobService, analyticsQueue);
// --- Graceful Shutdown Handling ---
process.on('SIGINT', () => gracefulShutdown('SIGINT'));
process.on('SIGTERM', () => gracefulShutdown('SIGTERM'));
}