Skip to content

Commit

Permalink
fix: increaesed scheduled jobs interval
Browse files Browse the repository at this point in the history
  • Loading branch information
mckrava committed Feb 20, 2024
1 parent 9714c4b commit 2de7778
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion deployment/feature-based/all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ data:
AGGREGATOR_REDIS_PREFIX: 'aggregator_queue_<BRANCH>'
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'
Expand Down
2 changes: 1 addition & 1 deletion deployment/prod/all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<RefreshAccountTxHistoryJobDataDto>) {
await job.takeLock();
Expand Down Expand Up @@ -53,7 +53,7 @@ export class AccountAggregationFlowConsumer {

@Process({
name: SubIdAggregatorJobName.REFRESH_TX_HISTORY_FOR_ACCOUNT_SCHEDULED,
concurrency: 200,
concurrency: 300,
})
async refreshTxHistoryScheduled(job: Job<RefreshAccountTxHistoryJobDataDto>) {
await job.takeLock();
Expand Down

0 comments on commit 2de7778

Please sign in to comment.