Se añade un event listener que loggea cuando se va a apagar la función
This commit is contained in:
@@ -19,6 +19,13 @@ type NivelType =
|
||||
type TipoCicloType =
|
||||
Database["public"]["Tables"]["planes_estudio"]["Insert"]["tipo_ciclo"];
|
||||
|
||||
addEventListener("beforeunload", (ev: any) => {
|
||||
// ev.detail.reason te dirá si es "timeout", "memory_limit" o "idle"
|
||||
console.error("ALERTA: La función se va a apagar. Razón:", ev.detail?.reason);
|
||||
|
||||
// Aquí puedes intentar un último log antes de que todo muera
|
||||
});
|
||||
|
||||
Deno.serve(async (req: Request): Promise<Response> => {
|
||||
const url = new URL(req.url);
|
||||
const functionName = url.pathname.split("/").pop();
|
||||
|
||||
Reference in New Issue
Block a user