@@ -55,6 +55,7 @@ func init() {
5555 rootCmd .PersistentFlags ().Int ("poller-from-block" , 0 , "From which block to start polling" )
5656 rootCmd .PersistentFlags ().Bool ("poller-force-from-block" , false , "Force the poller to start from the block specified in `poller-from-block`" )
5757 rootCmd .PersistentFlags ().Int ("poller-until-block" , 0 , "Until which block to poll" )
58+ rootCmd .PersistentFlags ().Int ("poller-parallel-pollers" , 5 , "Maximum number of parallel pollers" )
5859 rootCmd .PersistentFlags ().Bool ("committer-enabled" , true , "Toggle committer" )
5960 rootCmd .PersistentFlags ().Int ("committer-blocks-per-commit" , 10 , "How many blocks to commit each interval" )
6061 rootCmd .PersistentFlags ().Int ("committer-interval" , 1000 , "How often to commit blocks in milliseconds" )
@@ -76,6 +77,7 @@ func init() {
7677 rootCmd .PersistentFlags ().String ("storage-orchestrator-clickhouse-host" , "" , "Clickhouse host for orchestrator storage" )
7778 rootCmd .PersistentFlags ().String ("storage-orchestrator-clickhouse-username" , "" , "Clickhouse username for orchestrator storage" )
7879 rootCmd .PersistentFlags ().String ("storage-orchestrator-clickhouse-password" , "" , "Clickhouse password for orchestrator storage" )
80+ rootCmd .PersistentFlags ().Bool ("storage-orchestrator-clickhouse-asyncInsert" , false , "Clickhouse async insert for orchestrator storage" )
7981 rootCmd .PersistentFlags ().Int ("storage-orchestrator-memory-maxItems" , 0 , "Max items for orchestrator memory storage" )
8082 rootCmd .PersistentFlags ().Int ("storage-orchestrator-redis-poolSize" , 0 , "Redis pool size for orchestrator storage" )
8183 rootCmd .PersistentFlags ().String ("storage-orchestrator-redis-addr" , "" , "Redis address for orchestrator storage" )
@@ -85,8 +87,10 @@ func init() {
8587 rootCmd .PersistentFlags ().String ("storage-main-clickhouse-host" , "" , "Clickhouse host for main storage" )
8688 rootCmd .PersistentFlags ().String ("storage-main-clickhouse-username" , "" , "Clickhouse username for main storage" )
8789 rootCmd .PersistentFlags ().String ("storage-main-clickhouse-password" , "" , "Clickhouse password for main storage" )
90+ rootCmd .PersistentFlags ().Bool ("storage-main-clickhouse-asyncInsert" , false , "Clickhouse async insert for main storage" )
8891 rootCmd .PersistentFlags ().String ("storage-staging-clickhouse-username" , "" , "Clickhouse username for staging storage" )
8992 rootCmd .PersistentFlags ().String ("storage-staging-clickhouse-password" , "" , "Clickhouse password for staging storage" )
93+ rootCmd .PersistentFlags ().Bool ("storage-staging-clickhouse-asyncInsert" , false , "Clickhouse async insert for staging storage" )
9094 rootCmd .PersistentFlags ().String ("api-host" , "localhost:3000" , "API host" )
9195 viper .BindPFlag ("rpc.url" , rootCmd .PersistentFlags ().Lookup ("rpc-url" ))
9296 viper .BindPFlag ("rpc.blocks.blocksPerRequest" , rootCmd .PersistentFlags ().Lookup ("rpc-blocks-blocksPerRequest" ))
@@ -107,6 +111,7 @@ func init() {
107111 viper .BindPFlag ("poller.fromBlock" , rootCmd .PersistentFlags ().Lookup ("poller-from-block" ))
108112 viper .BindPFlag ("poller.forceFromBlock" , rootCmd .PersistentFlags ().Lookup ("poller-force-from-block" ))
109113 viper .BindPFlag ("poller.untilBlock" , rootCmd .PersistentFlags ().Lookup ("poller-until-block" ))
114+ viper .BindPFlag ("poller.parallelPollers" , rootCmd .PersistentFlags ().Lookup ("poller-parallel-pollers" ))
110115 viper .BindPFlag ("committer.enabled" , rootCmd .PersistentFlags ().Lookup ("committer-enabled" ))
111116 viper .BindPFlag ("committer.blocksPerCommit" , rootCmd .PersistentFlags ().Lookup ("committer-blocks-per-commit" ))
112117 viper .BindPFlag ("committer.interval" , rootCmd .PersistentFlags ().Lookup ("committer-interval" ))
@@ -122,18 +127,21 @@ func init() {
122127 viper .BindPFlag ("storage.staging.clickhouse.database" , rootCmd .PersistentFlags ().Lookup ("storage-staging-clickhouse-database" ))
123128 viper .BindPFlag ("storage.staging.clickhouse.host" , rootCmd .PersistentFlags ().Lookup ("storage-staging-clickhouse-host" ))
124129 viper .BindPFlag ("storage.staging.clickhouse.port" , rootCmd .PersistentFlags ().Lookup ("storage-staging-clickhouse-port" ))
130+ viper .BindPFlag ("storage.staging.clickhouse.username" , rootCmd .PersistentFlags ().Lookup ("storage-staging-clickhouse-username" ))
131+ viper .BindPFlag ("storage.staging.clickhouse.password" , rootCmd .PersistentFlags ().Lookup ("storage-staging-clickhouse-password" ))
132+ viper .BindPFlag ("storage.staging.clickhouse.asyncInsert" , rootCmd .PersistentFlags ().Lookup ("storage-staging-clickhouse-asyncInsert" ))
125133 viper .BindPFlag ("storage.main.clickhouse.database" , rootCmd .PersistentFlags ().Lookup ("storage-main-clickhouse-database" ))
126134 viper .BindPFlag ("storage.main.clickhouse.host" , rootCmd .PersistentFlags ().Lookup ("storage-main-clickhouse-host" ))
127135 viper .BindPFlag ("storage.main.clickhouse.port" , rootCmd .PersistentFlags ().Lookup ("storage-main-clickhouse-port" ))
128136 viper .BindPFlag ("storage.main.clickhouse.username" , rootCmd .PersistentFlags ().Lookup ("storage-main-clickhouse-username" ))
129137 viper .BindPFlag ("storage.main.clickhouse.password" , rootCmd .PersistentFlags ().Lookup ("storage-main-clickhouse-password" ))
130- viper .BindPFlag ("storage.staging.clickhouse.username" , rootCmd .PersistentFlags ().Lookup ("storage-main-clickhouse-username" ))
131- viper .BindPFlag ("storage.staging.clickhouse.password" , rootCmd .PersistentFlags ().Lookup ("storage-main-clickhouse-password" ))
138+ viper .BindPFlag ("storage.main.clickhouse.asyncInsert" , rootCmd .PersistentFlags ().Lookup ("storage-main-clickhouse-asyncInsert" ))
132139 viper .BindPFlag ("storage.orchestrator.clickhouse.database" , rootCmd .PersistentFlags ().Lookup ("storage-orchestrator-clickhouse-database" ))
133140 viper .BindPFlag ("storage.orchestrator.clickhouse.host" , rootCmd .PersistentFlags ().Lookup ("storage-orchestrator-clickhouse-host" ))
134141 viper .BindPFlag ("storage.orchestrator.clickhouse.port" , rootCmd .PersistentFlags ().Lookup ("storage-orchestrator-clickhouse-port" ))
135142 viper .BindPFlag ("storage.orchestrator.clickhouse.username" , rootCmd .PersistentFlags ().Lookup ("storage-orchestrator-clickhouse-username" ))
136143 viper .BindPFlag ("storage.orchestrator.clickhouse.password" , rootCmd .PersistentFlags ().Lookup ("storage-orchestrator-clickhouse-password" ))
144+ viper .BindPFlag ("storage.orchestrator.clickhouse.asyncInsert" , rootCmd .PersistentFlags ().Lookup ("storage-orchestrator-clickhouse-asyncInsert" ))
137145 viper .BindPFlag ("storage.orchestrator.memory.maxItems" , rootCmd .PersistentFlags ().Lookup ("storage-orchestrator-memory-maxItems" ))
138146 viper .BindPFlag ("storage.orchestrator.redis.poolSize" , rootCmd .PersistentFlags ().Lookup ("storage-orchestrator-redis-poolSize" ))
139147 viper .BindPFlag ("storage.orchestrator.redis.addr" , rootCmd .PersistentFlags ().Lookup ("storage-orchestrator-redis-addr" ))
0 commit comments