admin roadmap done, reupload request, submission history, manual override
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { prisma } from "@/lib/prisma";
|
||||
import { notifyAdmins } from "@/lib/admin-notify";
|
||||
|
||||
/**
|
||||
* Wrapper untuk cron route handler — otomatis log start/finish/error ke
|
||||
@@ -62,6 +63,11 @@ export async function runCron<T>(
|
||||
})
|
||||
.catch((e) => console.error(`[cron-runner] gagal update FAILED`, e));
|
||||
}
|
||||
// Fire-and-forget — jangan blok response cron route handler. Notif gagal
|
||||
// di-log sendiri di `notifyAdmins`.
|
||||
void notifyAdmins(
|
||||
`Cron \`${jobName}\` FAILED: ${message}`
|
||||
);
|
||||
return { ok: false, error: message };
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user