mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-11-20 19:32:38 +01:00
* fix: prevent duplicate access alerts to the same recipient * fix: address recipient alert recovery review findings * fix: reconcile unsent alerts and wait for startup migration * fix: preserve legacy recipient alerts through upgrades * fix: reconcile alert results and legacy recovery races * fix: fence dispatch and clean cancelled alert metadata * fix: fence alert preparation and retain in-flight recovery * fix: atomically commit alert dispatch and retry deferred recovery * fix: keep recovery lookups from blocking upstream file reads
18 lines
638 B
TypeScript
18 lines
638 B
TypeScript
import mongoose from "mongoose";
|
|
import config from "../config";
|
|
import { getMongoUrl } from "../server/database";
|
|
import { prepareLegacyOwnerAlertMigration } from "../core/owner-notifications";
|
|
|
|
async function main(): Promise<void> {
|
|
await mongoose.connect(getMongoUrl(), config.MONGODB_URI ? {} : { authSource: "admin" });
|
|
try {
|
|
await prepareLegacyOwnerAlertMigration();
|
|
process.stdout.write("Legacy owner alert reconciliation prepared\n");
|
|
} finally { await mongoose.disconnect(); }
|
|
}
|
|
|
|
void main().catch(() => {
|
|
process.stderr.write("Could not prepare legacy owner alert reconciliation\n");
|
|
process.exitCode = 1;
|
|
});
|