diff --git a/src/config/default.json b/src/config/default.json index d4fa29c7c..446dcc196 100644 --- a/src/config/default.json +++ b/src/config/default.json @@ -66,7 +66,8 @@ "elasticMaxBatch": 10000, "dbBatch": 1000, "complexityLevel": 200, - "getLogsFromElasticBatchSize": 1000 + "getLogsFromElasticBatchSize": 1000, + "dbMaxTimestamp": 2147483647 }, "elasticDictionary": { "scamInfo": { diff --git a/src/modules/marketplaces/marketplaces-reindex.service.ts b/src/modules/marketplaces/marketplaces-reindex.service.ts index 6f0100c74..b645ac28e 100644 --- a/src/modules/marketplaces/marketplaces-reindex.service.ts +++ b/src/modules/marketplaces/marketplaces-reindex.service.ts @@ -576,7 +576,15 @@ export class MarketplacesReindexService { private async addMarketplaceStateToDb( marketplaceReindexState: MarketplaceReindexState, ): Promise { - marketplaceReindexState.auctions.map((a) => delete a.id); + marketplaceReindexState.auctions.map((a) => { + delete a.id; + if (a.startDate > constants.dbMaxTimestamp) { + a.startDate = constants.dbMaxTimestamp; + } + if (a.endDate > constants.dbMaxTimestamp) { + a.endDate = constants.dbMaxTimestamp; + } + }); marketplaceReindexState.orders.map((o) => delete o.id); marketplaceReindexState.offers.map((o) => delete o.id);