Skip to content

Commit

Permalink
fix - do not await infinite promise
Browse files Browse the repository at this point in the history
  • Loading branch information
ashkuc committed Jul 24, 2023
1 parent eaff1ec commit 14073ef
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion apps/crawler/src/subscribers/subscribers.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,18 @@ export class SubscribersService {

await client.connect();
await client.query(`LISTEN ${FORCE_RESCAN_BLOCK}`);
this.logger.log(
`Listening for notifications on channel ${FORCE_RESCAN_BLOCK}`,
);
}

async run() {
const subscribersConfig = this.configService.get('subscribers');

if (subscribersConfig[SubscriberName.BLOCKS]) {
await this.blocksSubscriberService.subscribe();
this.blocksSubscriberService
.subscribe()
.then(() => this.logger.log('subscribe() resolved'));
}

await this.listenPgEvents();
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "polkastats-backend-uniquenetwork",
"version": "2.0.54",
"version": "2.0.55",
"description": "",
"author": "Unique Network Team",
"private": true,
Expand Down

0 comments on commit 14073ef

Please sign in to comment.