Skip to content

Open-source status page, incident response and uptime monitoring

🚑 Bug workflow (#1186)

Thibault Le Ouayd7d5ef9e0799
diff --git a/apps/workflows/src/cron/monitor.ts b/apps/workflows/src/cron/monitor.ts
index 25ddc2fff..9294fc833 100644
--- a/apps/workflows/src/cron/monitor.ts
+++ b/apps/workflows/src/cron/monitor.ts
@@ -39,7 +39,7 @@ const parent = client.queuePath(
"workflow",
);
-const limiter = new RateLimiter({ tokensPerInterval: 50, interval: "minute" });
+const limiter = new RateLimiter({ tokensPerInterval: 15, interval: "second" });
export async function LaunchMonitorWorkflow() {
// Expires is one month after last connection, so if we want to reach people who connected 3 months ago we need to check for people with expires 2 months ago
@@ -169,8 +169,8 @@ async function workflowInit({
isNull(schema.monitor.deletedAt),
),
);
- if (nbRunningMonitor > 0) {
- console.log(`user has running monitors for ${user.userId}`);
+ if (nbRunningMonitor === 0) {
+ console.log(`user has no running monitors for ${user.userId}`);
return;
}
await CreateTask({