Skip to content

Commit

Permalink
fix(monitoring): always setup non lazy when spinned (#158)
Browse files Browse the repository at this point in the history
* fix(monitoring): always setup non lazy when spinned

* fix

* fix
  • Loading branch information
samuelmasse committed Aug 25, 2021
1 parent c99c805 commit 2b22a68
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/server/src/instances/monitoring.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ export class InstanceMonitoring {
const outdateds = await this.conduits.listOutdated(ms('10h'), 1000)

for (const outdated of outdateds) {
const failures = await this.status.getNumberOfErrors(outdated.id)
if (failures && failures >= MAX_ALLOWED_FAILURES) {
const failures = (await this.status.getNumberOfErrors(outdated.id)) || 0
if (!yn(process.env.SPINNED) && failures >= MAX_ALLOWED_FAILURES) {
continue
}

Expand All @@ -59,8 +59,8 @@ export class InstanceMonitoring {

const conduits = await this.conduits.listByChannel(channel.id)
for (const conduit of conduits) {
const failures = await this.status.getNumberOfErrors(conduit.id)
if (failures && failures >= MAX_ALLOWED_FAILURES) {
const failures = (await this.status.getNumberOfErrors(conduit.id)) || 0
if (!yn(process.env.SPINNED) && failures >= MAX_ALLOWED_FAILURES) {
continue
}

Expand Down

0 comments on commit 2b22a68

Please sign in to comment.