feat: MedSchedule модуль — семейный медицинский помощник с Telegram/MAX ботом, n8n OCR и /med UI

This commit is contained in:
2026-07-15 09:42:55 +03:00
parent d35d0cd1ef
commit f519ce95db
15 changed files with 2960 additions and 2 deletions

View File

@@ -6,6 +6,7 @@ import { setupVite, serveStatic, log } from "./vite";
import { pushService } from "./services/push.service";
import { notificationService } from "./services/notification.service";
import { webPushService } from "./services/web-push.service";
import { startMedScheduleWorker } from "./medschedule/worker";
import { storage } from "./storage";
import type { ReminderRecipient } from "@shared/schema";
import { db, withSuperAdmin } from "./db"; // lazy proxy — safe at module load; throws on first use if DATABASE_URL missing
@@ -1020,6 +1021,10 @@ async function runStartupDataPatches() {
pushService.startQueueProcessor(5000);
log('Push notification worker started (Pushy)');
// Start MedSchedule worker (medication reminders, daily check-ins, expiry alerts)
startMedScheduleWorker();
log('MedSchedule worker started');
// Clean up duplicate subscriptions then backfill defaults for existing users
(async () => {
try {