Update index.ts

This commit is contained in:
Nicolas 2024-07-12 19:12:56 -04:00
parent fd18f2269b
commit fc3328f3d1

View File

@ -2,6 +2,7 @@ import { getWebScraperQueue } from "../queue-service";
import { sendSlackWebhook } from "./slack";
export function initAlerts() {
try {
if (
process.env.SLACK_WEBHOOK_URL &&
process.env.ENV === "production" &&
@ -52,4 +53,7 @@ export function initAlerts() {
setInterval(checkAll, 5 * 60 * 1000); // Run every 5 minutes
}
} catch (error) {
console.error("Failed to initialize alerts:", error);
}
}