Skip to content

Commit

Permalink
fix(betteruptime): only create alarm iff success
Browse files Browse the repository at this point in the history
  • Loading branch information
kishore03109 committed Jan 3, 2024
1 parent 4f9017b commit 2cae2db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/services/infra/InfraService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,9 @@ export default class InfraService {
siteStatus: SiteStatus.Launched,
jobStatus: JobStatus.Ready,
}

// Create better uptime monitor iff site launch is a success
await this.createMonitor(message.primaryDomainSource)
} else {
updateSiteLaunchParams = {
id: site.value.id,
Expand All @@ -614,10 +617,7 @@ export default class InfraService {
}
}

// Create better uptime monitor
await this.createMonitor(message.primaryDomainSource)
await this.sitesService.update(updateSiteLaunchParams)

await this.sendEmailUpdate(message, isSuccess)
})
)
Expand Down

0 comments on commit 2cae2db

Please sign in to comment.