remove unused parameters

This commit is contained in:
medcl 2023-02-09 14:14:24 +08:00
parent f9245a5c3b
commit c1739df13b
2 changed files with 0 additions and 18 deletions

View File

@ -27,7 +27,6 @@ import (
type ActivityProcessor struct {
config *Config
runningConfigs map[string]*queue.QueueConfig
bulkSizeInByte int
wg sync.WaitGroup
inFlightQueueConfigs sync.Map
detectorRunning bool
@ -44,7 +43,6 @@ func NewActivityProcessor(c *config.Config) (pipeline.Processor, error) {
MaxWorkers: 10,
MaxConnectionPerHost: 1,
IdleTimeoutInSecond: 5,
BulkSizeInMb: 10,
DetectIntervalInMs: 10000,
Queues: map[string]interface{}{},
@ -78,11 +76,6 @@ func NewActivityProcessor(c *config.Config) (pipeline.Processor, error) {
inFlightQueueConfigs: sync.Map{},
}
runner.bulkSizeInByte = 1048576 * runner.config.BulkSizeInMb
if runner.config.BulkSizeInKb > 0 {
runner.bulkSizeInByte = 1024 * runner.config.BulkSizeInKb
}
runner.wg = sync.WaitGroup{}
return &runner, nil

View File

@ -26,7 +26,6 @@ import (
type MetadataProcessor struct {
config *Config
runningConfigs map[string]*queue.QueueConfig
bulkSizeInByte int
wg sync.WaitGroup
inFlightQueueConfigs sync.Map
detectorRunning bool
@ -39,10 +38,6 @@ type Config struct {
IdleTimeoutInSecond int `config:"idle_timeout_in_seconds"`
MaxConnectionPerHost int `config:"max_connection_per_node"`
BulkSizeInKb int `config:"bulk_size_in_kb,omitempty"`
BulkSizeInMb int `config:"bulk_size_in_mb,omitempty"`
BulkMaxDocsCount int `config:"bulk_max_docs_count,omitempty"`
Queues map[string]interface{} `config:"queues,omitempty"`
Consumer queue.ConsumerConfig `config:"consumer"`
@ -74,7 +69,6 @@ func New(c *config.Config) (pipeline.Processor, error) {
MaxWorkers: 10,
MaxConnectionPerHost: 1,
IdleTimeoutInSecond: 5,
BulkSizeInMb: 10,
DetectIntervalInMs: 10000,
Queues: map[string]interface{}{},
@ -108,11 +102,6 @@ func New(c *config.Config) (pipeline.Processor, error) {
inFlightQueueConfigs: sync.Map{},
}
runner.bulkSizeInByte = 1048576 * runner.config.BulkSizeInMb
if runner.config.BulkSizeInKb > 0 {
runner.bulkSizeInByte = 1024 * runner.config.BulkSizeInKb
}
runner.wg = sync.WaitGroup{}
return &runner, nil