Remove unnecessary calendar cleanup scripts

Now using the trigger-calendar-cleanup edge function instead,
which is cleaner and avoids the 255 character command limit in Coolify.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
dwindown
2026-01-11 22:59:17 +07:00
parent 7165fcee9b
commit 1ef85a22d5

View File

@@ -1,40 +0,0 @@
#!/usr/bin/env -S deno run --allow-net --allow-env
/**
* Script to trigger the cancel-expired-consulting-orders edge function
* Usage: deno run --allow-net --allow-env scripts/trigger-calendar-cleanup.js
* This script is designed to be used in Coolify scheduled tasks
*
* This uses Deno's built-in fetch() API, just like the Supabase edge functions.
*/
const SUPABASE_URL = Deno.env.get("SUPABASE_URL") || "http://supabase-edge-functions:8000";
const FUNCTION_PATH = "/functions/v1/cancel-expired-consulting-orders";
const ANON_KEY = Deno.env.get("SUPABASE_ANON_KEY") || "";
async function triggerCleanup() {
const url = `${SUPABASE_URL}${FUNCTION_PATH}`;
try {
const response = await fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${ANON_KEY}`,
},
});
if (!response.ok) {
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
}
const result = await response.json();
console.log(JSON.stringify(result));
Deno.exit(0);
} catch (error) {
console.error("Error triggering calendar cleanup:", error.message);
Deno.exit(1);
}
}
await triggerCleanup();