feat: Implement session processing and refresh schedulers

- 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.
This commit is contained in:
Max Kowalski
2025-06-25 16:14:01 +02:00
parent c9e24298cd
commit 3196dabdf2
23 changed files with 2267 additions and 49 deletions

View File

@ -4,7 +4,7 @@
"version": "0.2.0",
"private": true,
"dependencies": {
"@prisma/client": "^6.8.2",
"@prisma/client": "^6.10.1",
"@rapideditor/country-coder": "^5.4.0",
"@types/d3": "^7.4.3",
"@types/d3-cloud": "^1.2.9",
@ -50,7 +50,7 @@
"postcss": "^8.5.3",
"prettier": "^3.5.3",
"prettier-plugin-jinja-template": "^2.1.0",
"prisma": "^6.8.2",
"prisma": "^6.10.1",
"tailwindcss": "^4.1.7",
"ts-node": "^10.9.2",
"typescript": "^5.0.0"
@ -58,6 +58,7 @@
"scripts": {
"build": "next build",
"dev": "next dev --turbopack",
"dev:with-schedulers": "node server.mjs",
"format": "npx prettier --write .",
"format:check": "npx prettier --check .",
"lint": "next lint",
@ -66,7 +67,7 @@
"prisma:migrate": "prisma migrate dev",
"prisma:seed": "node prisma/seed.mjs",
"prisma:studio": "prisma studio",
"start": "next start",
"start": "node server.mjs",
"lint:md": "markdownlint-cli2 \"**/*.md\" \"!.trunk/**\" \"!.venv/**\" \"!node_modules/**\"",
"lint:md:fix": "markdownlint-cli2 --fix \"**/*.md\" \"!.trunk/**\" \"!.venv/**\" \"!node_modules/**\""
},