refactor: initial moves

This commit is contained in:
syntaxbullet
2026-01-08 16:09:26 +01:00
parent 53a2f1ff0c
commit 88b266f81b
164 changed files with 529 additions and 280 deletions

View File

@@ -0,0 +1,21 @@
import { temporaryRoleService } from "@shared/modules/system/temp-role.service";
export const schedulerService = {
start: () => {
console.log("🕒 Scheduler started: Maintenance loops initialized.");
// 1. Temporary Role Revocation (every 60s)
setInterval(() => {
temporaryRoleService.processExpiredRoles();
}, 60 * 1000);
// 2. Terminal Update Loop (every 60s)
const { terminalService } = require("@/modules/terminal/terminal.service");
setInterval(() => {
terminalService.update();
}, 60 * 1000);
// Run an initial check on start
temporaryRoleService.processExpiredRoles();
}
};