mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 18:32:10 +01:00
feat: add repository pattern, service layer architecture, and scheduler management
- Implement repository pattern for data access layer - Add comprehensive service layer for business logic - Create scheduler management system with health monitoring - Add bounded buffer utility for memory management - Enhance security audit logging with retention policies
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import cron from "node-cron";
|
||||
import * as cron from "node-cron";
|
||||
import { executeScheduledRetention } from "./auditLogRetention";
|
||||
import {
|
||||
AuditOutcome,
|
||||
@ -8,7 +8,7 @@ import {
|
||||
} from "./securityAuditLogger";
|
||||
|
||||
export class AuditLogScheduler {
|
||||
private retentionTask: any = null;
|
||||
private retentionTask: cron.ScheduledTask | null = null;
|
||||
private isRunning = false;
|
||||
|
||||
constructor() {
|
||||
@ -130,7 +130,7 @@ export class AuditLogScheduler {
|
||||
} {
|
||||
return {
|
||||
isRunning: this.isRunning,
|
||||
nextExecution: this.retentionTask?.getStatus()?.next || undefined,
|
||||
nextExecution: undefined, // node-cron doesn't provide next execution time
|
||||
schedule: process.env.AUDIT_LOG_RETENTION_SCHEDULE || "0 2 * * 0",
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user