feat(automations): ctx.tasks.scheduleStatusChange — отложенная смена статуса (воркер 5с, отмена при ручном переходе)
This commit is contained in:
@@ -8,6 +8,7 @@ import { notificationService } from "./services/notification.service";
|
||||
import { webPushService } from "./services/web-push.service";
|
||||
import { startMedScheduleWorker } from "./medschedule/worker";
|
||||
import { startAutomationScheduler } from "./workers/automation-scheduler";
|
||||
import { startDelayedStatusChangeWorker } from "./workers/delayed-status-change.worker";
|
||||
import { startErrorLogsRetention } from "./workers/error-logs-retention";
|
||||
import { startGpsWorker } from "./gps/worker";
|
||||
import { storage } from "./storage";
|
||||
@@ -1142,6 +1143,10 @@ async function runStartupDataPatches() {
|
||||
startAutomationScheduler();
|
||||
log('Automation scheduler started');
|
||||
|
||||
// Start delayed status change worker (ctx.tasks.scheduleStatusChange, 5s interval)
|
||||
startDelayedStatusChangeWorker();
|
||||
log('Delayed status change worker started');
|
||||
|
||||
// Start error_logs retention (daily cleanup of API error log entries older than 30 days)
|
||||
startErrorLogsRetention();
|
||||
log('Error logs retention started');
|
||||
|
||||
Reference in New Issue
Block a user