From 2de77788dcf25ae3453040723d10cfa69b4baf89 Mon Sep 17 00:00:00 2001 From: mckrava Date: Tue, 20 Feb 2024 09:28:36 +0200 Subject: [PATCH] fix: increaesed scheduled jobs interval --- deployment/feature-based/all.yaml | 2 +- deployment/prod/all.yaml | 2 +- .../accountSyncScheduler/accountSyncScheduler.service.ts | 3 ++- .../services/consumers/accountAggregationFlow.consumer.ts | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/deployment/feature-based/all.yaml b/deployment/feature-based/all.yaml index 7a7f3ba..c826322 100644 --- a/deployment/feature-based/all.yaml +++ b/deployment/feature-based/all.yaml @@ -59,7 +59,7 @@ data: AGGREGATOR_REDIS_PREFIX: 'aggregator_queue_' AGGREGATOR_REDIS_PORT: '6379' AGGREGATOR_REDIS_ENABLE_SSL: 'false' - AGGREGATOR_HISTORY_RENEW_INTERVAL_MS: '120000' + AGGREGATOR_HISTORY_RENEW_INTERVAL_MS: '300000' AGGREGATOR_GS_MAIN_CHUNK_BLOCKS_SIZE: '2000000' DATA_SOURCE__SUBSQUID__POLKADOT__TRANSFER: 'https://squid.subsquid.io/gs-main-polkadot/graphql' diff --git a/deployment/prod/all.yaml b/deployment/prod/all.yaml index 4a0682c..56fd368 100644 --- a/deployment/prod/all.yaml +++ b/deployment/prod/all.yaml @@ -59,7 +59,7 @@ data: AGGREGATOR_REDIS_PREFIX: 'aggregator_queue' AGGREGATOR_REDIS_PORT: '6379' AGGREGATOR_REDIS_ENABLE_SSL: 'false' - AGGREGATOR_HISTORY_RENEW_INTERVAL_MS: '60000' + AGGREGATOR_HISTORY_RENEW_INTERVAL_MS: '300000' AGGREGATOR_GS_MAIN_CHUNK_BLOCKS_SIZE: '1000000' DATA_SOURCE__SUBSQUID__POLKADOT__TRANSFER: 'https://squid.subsquid.io/gs-main-polkadot/graphql' diff --git a/src/modules/accountSyncScheduler/accountSyncScheduler.service.ts b/src/modules/accountSyncScheduler/accountSyncScheduler.service.ts index ea0be93..a8d11bd 100644 --- a/src/modules/accountSyncScheduler/accountSyncScheduler.service.ts +++ b/src/modules/accountSyncScheduler/accountSyncScheduler.service.ts @@ -72,7 +72,8 @@ export class AccountSyncSchedulerService { priority: 2, repeat: { every: this.appConfig.AGGREGATOR_HISTORY_RENEW_INTERVAL_MS, - limit: 120_960, // 7 days with interval 5 sec + limit: 864, // 3 days with interval 5 min + // limit: 120_960, // 7 days with interval 5 sec }, }, }); diff --git a/src/modules/queueProcessor/services/consumers/accountAggregationFlow.consumer.ts b/src/modules/queueProcessor/services/consumers/accountAggregationFlow.consumer.ts index c77523e..0e3a8a5 100644 --- a/src/modules/queueProcessor/services/consumers/accountAggregationFlow.consumer.ts +++ b/src/modules/queueProcessor/services/consumers/accountAggregationFlow.consumer.ts @@ -19,7 +19,7 @@ export class AccountAggregationFlowConsumer { @Process({ name: SubIdAggregatorJobName.REFRESH_TX_HISTORY_FOR_ACCOUNT_ON_DEMAND, - concurrency: 200, + concurrency: 300, }) async refreshTxHistory(job: Job) { await job.takeLock(); @@ -53,7 +53,7 @@ export class AccountAggregationFlowConsumer { @Process({ name: SubIdAggregatorJobName.REFRESH_TX_HISTORY_FOR_ACCOUNT_SCHEDULED, - concurrency: 200, + concurrency: 300, }) async refreshTxHistoryScheduled(job: Job) { await job.takeLock();