From 4628b204c0e698e9a36b5a3951bb294b81ebafa2 Mon Sep 17 00:00:00 2001 From: Michel Meier Date: Thu, 21 Mar 2024 16:25:25 +0100 Subject: [PATCH] feat: add ds_threads config param --- .env_template | 2 ++ src/common/config.ts | 1 + src/eosio/ship-reader-wrapper.ts | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.env_template b/.env_template index 162a9fb..5f04d07 100644 --- a/.env_template +++ b/.env_template @@ -5,6 +5,8 @@ EOSIO_NODE_API= # node shipreader endpoint (ws(s)://...) # block to start initially from EOSIO_START_BLOCK= +# number of threads +EOSIO_DS_THREADS=4 # unique client_id for interacting with Kafka KAFKA_CLIENT_ID= diff --git a/src/common/config.ts b/src/common/config.ts index 03863e3..142d3c3 100644 --- a/src/common/config.ts +++ b/src/common/config.ts @@ -10,6 +10,7 @@ export const EOSIO_CONFIG = { start_block: Number(process.env.EOSIO_START_BLOCK), eosio_node_api: process.env.EOSIO_NODE_API, eosio_ship_api: process.env.EOSIO_SHIP_API, + ds_threads: Number(process.env.EOSIO_DS_THREADS || 4), }; export const KAFKA_CONFIG: KafkaConfig = { diff --git a/src/eosio/ship-reader-wrapper.ts b/src/eosio/ship-reader-wrapper.ts index a122107..43ee02c 100644 --- a/src/eosio/ship-reader-wrapper.ts +++ b/src/eosio/ship-reader-wrapper.ts @@ -264,7 +264,7 @@ export class ShipReaderWrapper { const eosioReaderConfig: EosioReaderConfig = { ws_url: EOSIO_CONFIG.eosio_ship_api, rpc_url: EOSIO_CONFIG.eosio_node_api, - ds_threads: 6, + ds_threads: EOSIO_CONFIG.ds_threads, ds_experimental: false, delta_whitelist: delta_whitelist, table_rows_whitelist: this.config.table_rows_whitelist,