mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 09:32:08 +01:00
- Added processingScheduler.js and processingScheduler.ts to handle session transcript processing using OpenAI API. - Implemented a new scheduler (scheduler.js and schedulers.ts) for refreshing sessions every 15 minutes. - Updated Prisma migrations to add new fields for processed sessions, including questions, sentimentCategory, and summary. - Created scripts (process_sessions.mjs and process_sessions.ts) for manual processing of unprocessed sessions. - Enhanced server.js and server.mjs to initialize schedulers on server start.
19 lines
536 B
TypeScript
19 lines
536 B
TypeScript
// Combined scheduler initialization
|
|
import { startScheduler } from "./scheduler";
|
|
import { startProcessingScheduler } from "./processingScheduler";
|
|
|
|
/**
|
|
* Initialize all schedulers
|
|
* - Session refresh scheduler (runs every 15 minutes)
|
|
* - Session processing scheduler (runs every hour)
|
|
*/
|
|
export function initializeSchedulers() {
|
|
// Start the session refresh scheduler
|
|
startScheduler();
|
|
|
|
// Start the session processing scheduler
|
|
startProcessingScheduler();
|
|
|
|
console.log("All schedulers initialized successfully");
|
|
}
|