mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
refactor(breadcrumbs): use handler & match pattern
This commit is contained in:
@@ -39,6 +39,14 @@ class SchedulerClass {
|
||||
this.tasks = [];
|
||||
logger.info("Scheduler stopped");
|
||||
}
|
||||
|
||||
async clear() {
|
||||
for (const task of this.tasks) {
|
||||
task.destroy();
|
||||
}
|
||||
this.tasks = [];
|
||||
logger.info("Scheduler cleared all tasks");
|
||||
}
|
||||
}
|
||||
|
||||
export const Scheduler = new SchedulerClass();
|
||||
|
||||
@@ -13,6 +13,7 @@ import { CleanupSessionsJob } from "../../jobs/cleanup-sessions";
|
||||
|
||||
export const startup = async () => {
|
||||
await Scheduler.start();
|
||||
await Scheduler.clear();
|
||||
|
||||
await restic.ensurePassfile().catch((err) => {
|
||||
logger.error(`Error ensuring restic passfile exists: ${err.message}`);
|
||||
|
||||
Reference in New Issue
Block a user