Skip to content

Commit

Permalink
Remove console logs and increase nest sdk version
Browse files Browse the repository at this point in the history
  • Loading branch information
danielailie committed Mar 7, 2023
1 parent 39defbd commit 116eb52
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 23 deletions.
8 changes: 4 additions & 4 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
Expand Up @@ -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",
Expand Down
8 changes: 0 additions & 8 deletions src/crons/elastic.updater/traits.updater.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export class TraitsUpdaterService {
if (collections.length > lastIndex + maxCollectionsToValidate) {
return undefined;
}
console.log('handleValidateTokenTraits', { collections });
},
);

Expand Down Expand Up @@ -107,10 +106,6 @@ export class TraitsUpdaterService {
if (collectionsToUpdate.length >= maxCollectionsToUpdate) {
return undefined;
}

console.log('handleSetTraitsWhereNotSet', {
collectionsToUpdate,
});
},
);

Expand Down Expand Up @@ -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,
);
Expand All @@ -196,7 +189,6 @@ export class TraitsUpdaterService {
}

async addNftsToTraitQueue(collectionTickers: string[]): Promise<void> {
console.log('addNftsToTraitQueue', { collectionTickers });
if (collectionTickers?.length > 0) {
await this.redisCacheService.rpush(
this.getTraitsQueueCacheKey(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ export class ElasticUpdatesEventsService {

async addNftsToTraitsQueue(collectionTickers: string[]): Promise<void> {
if (collectionTickers?.length > 0) {
console.log('addNftsToTraitsQueue', { collectionTickers });
await this.redisCacheService.rpush(
this.getTraitsQueueCacheKey(),
collectionTickers,
Expand Down Expand Up @@ -239,15 +238,6 @@ export class ElasticUpdatesEventsService {

private async getCollectionType(ticker: string): Promise<string> {
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<string>(
cacheKey,
() => this.getCollectionTypeFromApi(ticker),
Expand Down

0 comments on commit 116eb52

Please sign in to comment.