From 116eb52db25970255e02660ee56ccbf266f119ec Mon Sep 17 00:00:00 2001 From: danielailie Date: Tue, 7 Mar 2023 12:01:23 +0200 Subject: [PATCH] Remove console logs and increase nest sdk version --- package-lock.json | 8 ++++---- package.json | 2 +- src/crons/elastic.updater/traits.updater.service.ts | 8 -------- .../elastic-updates/elastic-updates-events.service.ts | 10 ---------- 4 files changed, 5 insertions(+), 23 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7e51a3214..c2cf4a1b4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@golevelup/nestjs-rabbitmq": "3.4.0", "@multiversx/sdk-core": "11.2.0", "@multiversx/sdk-native-auth-server": "1.0.5", - "@multiversx/sdk-nestjs": "0.4.15", + "@multiversx/sdk-nestjs": "0.4.16", "@multiversx/sdk-network-providers": "^1.2.1", "@nestjs/apollo": "^10.1.7", "@nestjs/common": "9.3.9", @@ -3262,9 +3262,9 @@ "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" }, "node_modules/@multiversx/sdk-nestjs": { - "version": "0.4.15", - "resolved": "https://registry.npmjs.org/@multiversx/sdk-nestjs/-/sdk-nestjs-0.4.15.tgz", - "integrity": "sha512-gJlmOLJ+4UDiSOG0xzzjjLzo8K1paESQj/R7vAl6ZZMR3XuMrRZ/2kyW576TGybS8B2ayzNE3gImBMiFkiXbgA==", + "version": "0.4.16", + "resolved": "https://registry.npmjs.org/@multiversx/sdk-nestjs/-/sdk-nestjs-0.4.16.tgz", + "integrity": "sha512-Ume9DPnC2ge+yjV/4ajnVQSNw5VLumSAS4KMNd7K52VlEZviKB1xtajmuUM4fvitG/3uWuFETT8jTW9ve2sE6w==", "dependencies": { "@golevelup/nestjs-rabbitmq": "^3.0.0", "@multiversx/sdk-native-auth-client": "^1.0.0", diff --git a/package.json b/package.json index 8c6208900..78510518e 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "@golevelup/nestjs-rabbitmq": "3.4.0", "@multiversx/sdk-core": "11.2.0", "@multiversx/sdk-native-auth-server": "1.0.5", - "@multiversx/sdk-nestjs": "0.4.15", + "@multiversx/sdk-nestjs": "0.4.16", "@multiversx/sdk-network-providers": "^1.2.1", "@nestjs/apollo": "^10.1.7", "@nestjs/common": "9.3.9", diff --git a/src/crons/elastic.updater/traits.updater.service.ts b/src/crons/elastic.updater/traits.updater.service.ts index 5edf3ed29..49f5ebd06 100644 --- a/src/crons/elastic.updater/traits.updater.service.ts +++ b/src/crons/elastic.updater/traits.updater.service.ts @@ -50,7 +50,6 @@ export class TraitsUpdaterService { if (collections.length > lastIndex + maxCollectionsToValidate) { return undefined; } - console.log('handleValidateTokenTraits', { collections }); }, ); @@ -107,10 +106,6 @@ export class TraitsUpdaterService { if (collectionsToUpdate.length >= maxCollectionsToUpdate) { return undefined; } - - console.log('handleSetTraitsWhereNotSet', { - collectionsToUpdate, - }); }, ); @@ -180,11 +175,9 @@ export class TraitsUpdaterService { await Locker.lock( 'processTokenTraitsQueue: Update traits for all collections/NFTs in the traits queue', async () => { - console.log('redis queue', this.getTraitsQueueCacheKey()); const tokensToUpdate: string[] = await this.redisCacheService.lpop( this.getTraitsQueueCacheKey(), ); - console.log(' processTokenTraitsQueue', JSON.stringify(tokensToUpdate)); const notUpdatedNfts: string[] = await this.updateTokenTraits( tokensToUpdate, ); @@ -196,7 +189,6 @@ export class TraitsUpdaterService { } async addNftsToTraitQueue(collectionTickers: string[]): Promise { - console.log('addNftsToTraitQueue', { collectionTickers }); if (collectionTickers?.length > 0) { await this.redisCacheService.rpush( this.getTraitsQueueCacheKey(), diff --git a/src/modules/rabbitmq/elastic-updates/elastic-updates-events.service.ts b/src/modules/rabbitmq/elastic-updates/elastic-updates-events.service.ts index dd9235500..679ec06f0 100644 --- a/src/modules/rabbitmq/elastic-updates/elastic-updates-events.service.ts +++ b/src/modules/rabbitmq/elastic-updates/elastic-updates-events.service.ts @@ -208,7 +208,6 @@ export class ElasticUpdatesEventsService { async addNftsToTraitsQueue(collectionTickers: string[]): Promise { if (collectionTickers?.length > 0) { - console.log('addNftsToTraitsQueue', { collectionTickers }); await this.redisCacheService.rpush( this.getTraitsQueueCacheKey(), collectionTickers, @@ -239,15 +238,6 @@ export class ElasticUpdatesEventsService { private async getCollectionType(ticker: string): Promise { const cacheKey = this.getCollectionTypeCacheKey(ticker); - const getCollectionType = async () => { - const collection = - await this.mxApiService.getCollectionByIdentifierForQuery( - ticker, - 'fields=type', - ); - return collection.type; - }; - const collectionType = await this.redisCacheService.getOrSet( cacheKey, () => this.getCollectionTypeFromApi(ticker),