Skip to content

Commit

Permalink
chore: cancel empty queue on error
Browse files Browse the repository at this point in the history
  • Loading branch information
JGiter committed Aug 7, 2023
1 parent f63eb1c commit 4ff6281
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
6 changes: 0 additions & 6 deletions src/modules/did/did.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -493,12 +493,6 @@ export class DIDService implements OnModuleInit, OnModuleDestroy {
);
const jobsCounts = await this.didQueue.getJobCounts();
this.logger.debug(inspect(jobsCounts, { depth: 2, colors: true }));
if (/OOM/.test(String(e))) {
this.logger.warn(
`Redis exceeded memory limit. Removing waiting jobs from DID queue`
);
await this.didQueue.empty();
}
}
}
}
6 changes: 0 additions & 6 deletions src/modules/ipfs/ipfs.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,6 @@ export class IPFSService {
this.logger.debug(`Error to add pin job for cid ${cid}: ${e}`);
const jobsCounts = await this.pinsQueue.getJobCounts();
this.logger.debug(inspect(jobsCounts, { depth: 2, colors: true }));
if (/OOM/.test(String(e))) {
this.logger.warn(
`Redis exceeded memory limit. Removing waiting jobs from PIN queue`
);
await this.pinsQueue.empty();
}
}
return claim;
}
Expand Down

0 comments on commit 4ff6281

Please sign in to comment.