@@ -55,6 +55,7 @@ func init() {
55
55
rootCmd .PersistentFlags ().Int ("poller-from-block" , 0 , "From which block to start polling" )
56
56
rootCmd .PersistentFlags ().Bool ("poller-force-from-block" , false , "Force the poller to start from the block specified in `poller-from-block`" )
57
57
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" )
58
59
rootCmd .PersistentFlags ().Bool ("committer-enabled" , true , "Toggle committer" )
59
60
rootCmd .PersistentFlags ().Int ("committer-blocks-per-commit" , 10 , "How many blocks to commit each interval" )
60
61
rootCmd .PersistentFlags ().Int ("committer-interval" , 1000 , "How often to commit blocks in milliseconds" )
@@ -76,6 +77,8 @@ func init() {
76
77
rootCmd .PersistentFlags ().String ("storage-orchestrator-clickhouse-host" , "" , "Clickhouse host for orchestrator storage" )
77
78
rootCmd .PersistentFlags ().String ("storage-orchestrator-clickhouse-username" , "" , "Clickhouse username for orchestrator storage" )
78
79
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" )
79
82
rootCmd .PersistentFlags ().Int ("storage-orchestrator-memory-maxItems" , 0 , "Max items for orchestrator memory storage" )
80
83
rootCmd .PersistentFlags ().Int ("storage-orchestrator-redis-poolSize" , 0 , "Redis pool size for orchestrator storage" )
81
84
rootCmd .PersistentFlags ().String ("storage-orchestrator-redis-addr" , "" , "Redis address for orchestrator storage" )
@@ -85,8 +88,12 @@ func init() {
85
88
rootCmd .PersistentFlags ().String ("storage-main-clickhouse-host" , "" , "Clickhouse host for main storage" )
86
89
rootCmd .PersistentFlags ().String ("storage-main-clickhouse-username" , "" , "Clickhouse username for main storage" )
87
90
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" )
88
93
rootCmd .PersistentFlags ().String ("storage-staging-clickhouse-username" , "" , "Clickhouse username for staging storage" )
89
94
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" )
90
97
rootCmd .PersistentFlags ().String ("api-host" , "localhost:3000" , "API host" )
91
98
viper .BindPFlag ("rpc.url" , rootCmd .PersistentFlags ().Lookup ("rpc-url" ))
92
99
viper .BindPFlag ("rpc.blocks.blocksPerRequest" , rootCmd .PersistentFlags ().Lookup ("rpc-blocks-blocksPerRequest" ))
@@ -107,6 +114,7 @@ func init() {
107
114
viper .BindPFlag ("poller.fromBlock" , rootCmd .PersistentFlags ().Lookup ("poller-from-block" ))
108
115
viper .BindPFlag ("poller.forceFromBlock" , rootCmd .PersistentFlags ().Lookup ("poller-force-from-block" ))
109
116
viper .BindPFlag ("poller.untilBlock" , rootCmd .PersistentFlags ().Lookup ("poller-until-block" ))
117
+ viper .BindPFlag ("poller.parallelPollers" , rootCmd .PersistentFlags ().Lookup ("poller-parallel-pollers" ))
110
118
viper .BindPFlag ("committer.enabled" , rootCmd .PersistentFlags ().Lookup ("committer-enabled" ))
111
119
viper .BindPFlag ("committer.blocksPerCommit" , rootCmd .PersistentFlags ().Lookup ("committer-blocks-per-commit" ))
112
120
viper .BindPFlag ("committer.interval" , rootCmd .PersistentFlags ().Lookup ("committer-interval" ))
@@ -122,18 +130,24 @@ func init() {
122
130
viper .BindPFlag ("storage.staging.clickhouse.database" , rootCmd .PersistentFlags ().Lookup ("storage-staging-clickhouse-database" ))
123
131
viper .BindPFlag ("storage.staging.clickhouse.host" , rootCmd .PersistentFlags ().Lookup ("storage-staging-clickhouse-host" ))
124
132
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" ))
125
137
viper .BindPFlag ("storage.main.clickhouse.database" , rootCmd .PersistentFlags ().Lookup ("storage-main-clickhouse-database" ))
126
138
viper .BindPFlag ("storage.main.clickhouse.host" , rootCmd .PersistentFlags ().Lookup ("storage-main-clickhouse-host" ))
127
139
viper .BindPFlag ("storage.main.clickhouse.port" , rootCmd .PersistentFlags ().Lookup ("storage-main-clickhouse-port" ))
128
140
viper .BindPFlag ("storage.main.clickhouse.username" , rootCmd .PersistentFlags ().Lookup ("storage-main-clickhouse-username" ))
129
141
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 " ))
132
144
viper .BindPFlag ("storage.orchestrator.clickhouse.database" , rootCmd .PersistentFlags ().Lookup ("storage-orchestrator-clickhouse-database" ))
133
145
viper .BindPFlag ("storage.orchestrator.clickhouse.host" , rootCmd .PersistentFlags ().Lookup ("storage-orchestrator-clickhouse-host" ))
134
146
viper .BindPFlag ("storage.orchestrator.clickhouse.port" , rootCmd .PersistentFlags ().Lookup ("storage-orchestrator-clickhouse-port" ))
135
147
viper .BindPFlag ("storage.orchestrator.clickhouse.username" , rootCmd .PersistentFlags ().Lookup ("storage-orchestrator-clickhouse-username" ))
136
148
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" ))
137
151
viper .BindPFlag ("storage.orchestrator.memory.maxItems" , rootCmd .PersistentFlags ().Lookup ("storage-orchestrator-memory-maxItems" ))
138
152
viper .BindPFlag ("storage.orchestrator.redis.poolSize" , rootCmd .PersistentFlags ().Lookup ("storage-orchestrator-redis-poolSize" ))
139
153
viper .BindPFlag ("storage.orchestrator.redis.addr" , rootCmd .PersistentFlags ().Lookup ("storage-orchestrator-redis-addr" ))
0 commit comments