feat: implement automated job cleanup, update notification presets, and upgrade Baileys library

This commit is contained in:
2026-07-21 21:12:29 -03:00
parent aac53e13cc
commit 98f0ec3102
8 changed files with 388 additions and 35 deletions
@@ -102,4 +102,12 @@ export class NotificationJobModel {
this.schema
);
}
async deleteBeforeScheduledAt(cutoff: Date): Promise<number> {
const result = await this.notificationJobList.deleteMany({
scheduledAt: { $lt: cutoff },
}).exec();
return result.deletedCount || 0;
}
}