Openstatus www.openstatus.dev
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

๐Ÿ› only one regions (#1002)

* ๐Ÿ› only one regions

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

authored by

Thibault Le Ouay
autofix-ci[bot]
and committed by
GitHub
451b29a2 2312b3eb

+3 -3
+3 -3
apps/server/src/checker/index.ts
··· 95 95 96 96 const numberOfRegions = monitor.regions.length; 97 97 98 - if (nbAffectedRegion >= numberOfRegions / 2) { 98 + if (nbAffectedRegion >= numberOfRegions / 2 || numberOfRegions === 1) { 99 99 await triggerNotifications({ 100 100 monitorId, 101 101 statusCode, ··· 146 146 ); 147 147 // If the number of affected regions is greater than half of the total region, we trigger the alerting 148 148 // 4 of 6 monitor need to fail to trigger an alerting 149 - if (nbAffectedRegion >= numberOfRegions / 2) { 149 + if (nbAffectedRegion >= numberOfRegions / 2 || numberOfRegions === 1) { 150 150 // let's refetch the incident to avoid race condition 151 151 const incident = await db 152 152 .select() ··· 239 239 ); 240 240 // // If the number of affected regions is greater than half of the total region, we trigger the alerting 241 241 // // 4 of 6 monitor need to fail to trigger an alerting 242 - if (nbAffectedRegion >= numberOfRegions / 2) { 242 + if (nbAffectedRegion >= numberOfRegions / 2 || numberOfRegions === 1) { 243 243 const incident = await db 244 244 .select() 245 245 .from(incidentTable)