@@ -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,8 @@ 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" )
81+ rootCmd .PersistentFlags ().Int ("storage-orchestrator-clickhouse-maxRowsPerInsert" , 100000 , "Clickhouse max rows per insert for orchestrator storage" )
7982 rootCmd .PersistentFlags ().Int ("storage-orchestrator-memory-maxItems" , 0 , "Max items for orchestrator memory storage" )
8083 rootCmd .PersistentFlags ().Int ("storage-orchestrator-redis-poolSize" , 0 , "Redis pool size for orchestrator storage" )
8184 rootCmd .PersistentFlags ().String ("storage-orchestrator-redis-addr" , "" , "Redis address for orchestrator storage" )
@@ -85,8 +88,12 @@ func init() {
8588 rootCmd .PersistentFlags ().String ("storage-main-clickhouse-host" , "" , "Clickhouse host for main storage" )
8689 rootCmd .PersistentFlags ().String ("storage-main-clickhouse-username" , "" , "Clickhouse username for main storage" )
8790 rootCmd .PersistentFlags ().String ("storage-main-clickhouse-password" , "" , "Clickhouse password for main storage" )
91+ rootCmd .PersistentFlags ().Bool ("storage-main-clickhouse-asyncInsert" , false , "Clickhouse async insert for main storage" )
92+ rootCmd .PersistentFlags ().Int ("storage-main-clickhouse-maxRowsPerInsert" , 100000 , "Clickhouse max rows per insert for main storage" )
8893 rootCmd .PersistentFlags ().String ("storage-staging-clickhouse-username" , "" , "Clickhouse username for staging storage" )
8994 rootCmd .PersistentFlags ().String ("storage-staging-clickhouse-password" , "" , "Clickhouse password for staging storage" )
95+ rootCmd .PersistentFlags ().Bool ("storage-staging-clickhouse-asyncInsert" , false , "Clickhouse async insert for staging storage" )
96+ rootCmd .PersistentFlags ().Int ("storage-staging-clickhouse-maxRowsPerInsert" , 100000 , "Clickhouse max rows per insert for staging storage" )
9097 rootCmd .PersistentFlags ().String ("api-host" , "localhost:3000" , "API host" )
9198 viper .BindPFlag ("rpc.url" , rootCmd .PersistentFlags ().Lookup ("rpc-url" ))
9299 viper .BindPFlag ("rpc.blocks.blocksPerRequest" , rootCmd .PersistentFlags ().Lookup ("rpc-blocks-blocksPerRequest" ))
@@ -107,6 +114,7 @@ func init() {
107114 viper .BindPFlag ("poller.fromBlock" , rootCmd .PersistentFlags ().Lookup ("poller-from-block" ))
108115 viper .BindPFlag ("poller.forceFromBlock" , rootCmd .PersistentFlags ().Lookup ("poller-force-from-block" ))
109116 viper .BindPFlag ("poller.untilBlock" , rootCmd .PersistentFlags ().Lookup ("poller-until-block" ))
117+ viper .BindPFlag ("poller.parallelPollers" , rootCmd .PersistentFlags ().Lookup ("poller-parallel-pollers" ))
110118 viper .BindPFlag ("committer.enabled" , rootCmd .PersistentFlags ().Lookup ("committer-enabled" ))
111119 viper .BindPFlag ("committer.blocksPerCommit" , rootCmd .PersistentFlags ().Lookup ("committer-blocks-per-commit" ))
112120 viper .BindPFlag ("committer.interval" , rootCmd .PersistentFlags ().Lookup ("committer-interval" ))
@@ -122,18 +130,24 @@ func init() {
122130 viper .BindPFlag ("storage.staging.clickhouse.database" , rootCmd .PersistentFlags ().Lookup ("storage-staging-clickhouse-database" ))
123131 viper .BindPFlag ("storage.staging.clickhouse.host" , rootCmd .PersistentFlags ().Lookup ("storage-staging-clickhouse-host" ))
124132 viper .BindPFlag ("storage.staging.clickhouse.port" , rootCmd .PersistentFlags ().Lookup ("storage-staging-clickhouse-port" ))
133+ viper .BindPFlag ("storage.staging.clickhouse.username" , rootCmd .PersistentFlags ().Lookup ("storage-staging-clickhouse-username" ))
134+ viper .BindPFlag ("storage.staging.clickhouse.password" , rootCmd .PersistentFlags ().Lookup ("storage-staging-clickhouse-password" ))
135+ viper .BindPFlag ("storage.staging.clickhouse.asyncInsert" , rootCmd .PersistentFlags ().Lookup ("storage-staging-clickhouse-asyncInsert" ))
136+ viper .BindPFlag ("storage.staging.clickhouse.maxRowsPerInsert" , rootCmd .PersistentFlags ().Lookup ("storage-staging-clickhouse-maxRowsPerInsert" ))
125137 viper .BindPFlag ("storage.main.clickhouse.database" , rootCmd .PersistentFlags ().Lookup ("storage-main-clickhouse-database" ))
126138 viper .BindPFlag ("storage.main.clickhouse.host" , rootCmd .PersistentFlags ().Lookup ("storage-main-clickhouse-host" ))
127139 viper .BindPFlag ("storage.main.clickhouse.port" , rootCmd .PersistentFlags ().Lookup ("storage-main-clickhouse-port" ))
128140 viper .BindPFlag ("storage.main.clickhouse.username" , rootCmd .PersistentFlags ().Lookup ("storage-main-clickhouse-username" ))
129141 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 " ))
142+ viper .BindPFlag ("storage.main .clickhouse.asyncInsert " , rootCmd .PersistentFlags ().Lookup ("storage-main-clickhouse-asyncInsert " ))
143+ viper .BindPFlag ("storage.main .clickhouse.maxRowsPerInsert " , rootCmd .PersistentFlags ().Lookup ("storage-main-clickhouse-maxRowsPerInsert " ))
132144 viper .BindPFlag ("storage.orchestrator.clickhouse.database" , rootCmd .PersistentFlags ().Lookup ("storage-orchestrator-clickhouse-database" ))
133145 viper .BindPFlag ("storage.orchestrator.clickhouse.host" , rootCmd .PersistentFlags ().Lookup ("storage-orchestrator-clickhouse-host" ))
134146 viper .BindPFlag ("storage.orchestrator.clickhouse.port" , rootCmd .PersistentFlags ().Lookup ("storage-orchestrator-clickhouse-port" ))
135147 viper .BindPFlag ("storage.orchestrator.clickhouse.username" , rootCmd .PersistentFlags ().Lookup ("storage-orchestrator-clickhouse-username" ))
136148 viper .BindPFlag ("storage.orchestrator.clickhouse.password" , rootCmd .PersistentFlags ().Lookup ("storage-orchestrator-clickhouse-password" ))
149+ viper .BindPFlag ("storage.orchestrator.clickhouse.asyncInsert" , rootCmd .PersistentFlags ().Lookup ("storage-orchestrator-clickhouse-asyncInsert" ))
150+ viper .BindPFlag ("storage.orchestrator.clickhouse.maxRowsPerInsert" , rootCmd .PersistentFlags ().Lookup ("storage-orchestrator-clickhouse-maxRowsPerInsert" ))
137151 viper .BindPFlag ("storage.orchestrator.memory.maxItems" , rootCmd .PersistentFlags ().Lookup ("storage-orchestrator-memory-maxItems" ))
138152 viper .BindPFlag ("storage.orchestrator.redis.poolSize" , rootCmd .PersistentFlags ().Lookup ("storage-orchestrator-redis-poolSize" ))
139153 viper .BindPFlag ("storage.orchestrator.redis.addr" , rootCmd .PersistentFlags ().Lookup ("storage-orchestrator-redis-addr" ))
0 commit comments