remove unused parameters
This commit is contained in:
parent
f9245a5c3b
commit
c1739df13b
|
@ -27,7 +27,6 @@ import (
|
||||||
type ActivityProcessor struct {
|
type ActivityProcessor struct {
|
||||||
config *Config
|
config *Config
|
||||||
runningConfigs map[string]*queue.QueueConfig
|
runningConfigs map[string]*queue.QueueConfig
|
||||||
bulkSizeInByte int
|
|
||||||
wg sync.WaitGroup
|
wg sync.WaitGroup
|
||||||
inFlightQueueConfigs sync.Map
|
inFlightQueueConfigs sync.Map
|
||||||
detectorRunning bool
|
detectorRunning bool
|
||||||
|
@ -44,7 +43,6 @@ func NewActivityProcessor(c *config.Config) (pipeline.Processor, error) {
|
||||||
MaxWorkers: 10,
|
MaxWorkers: 10,
|
||||||
MaxConnectionPerHost: 1,
|
MaxConnectionPerHost: 1,
|
||||||
IdleTimeoutInSecond: 5,
|
IdleTimeoutInSecond: 5,
|
||||||
BulkSizeInMb: 10,
|
|
||||||
DetectIntervalInMs: 10000,
|
DetectIntervalInMs: 10000,
|
||||||
Queues: map[string]interface{}{},
|
Queues: map[string]interface{}{},
|
||||||
|
|
||||||
|
@ -78,11 +76,6 @@ func NewActivityProcessor(c *config.Config) (pipeline.Processor, error) {
|
||||||
inFlightQueueConfigs: sync.Map{},
|
inFlightQueueConfigs: sync.Map{},
|
||||||
}
|
}
|
||||||
|
|
||||||
runner.bulkSizeInByte = 1048576 * runner.config.BulkSizeInMb
|
|
||||||
if runner.config.BulkSizeInKb > 0 {
|
|
||||||
runner.bulkSizeInByte = 1024 * runner.config.BulkSizeInKb
|
|
||||||
}
|
|
||||||
|
|
||||||
runner.wg = sync.WaitGroup{}
|
runner.wg = sync.WaitGroup{}
|
||||||
|
|
||||||
return &runner, nil
|
return &runner, nil
|
||||||
|
|
|
@ -26,7 +26,6 @@ import (
|
||||||
type MetadataProcessor struct {
|
type MetadataProcessor struct {
|
||||||
config *Config
|
config *Config
|
||||||
runningConfigs map[string]*queue.QueueConfig
|
runningConfigs map[string]*queue.QueueConfig
|
||||||
bulkSizeInByte int
|
|
||||||
wg sync.WaitGroup
|
wg sync.WaitGroup
|
||||||
inFlightQueueConfigs sync.Map
|
inFlightQueueConfigs sync.Map
|
||||||
detectorRunning bool
|
detectorRunning bool
|
||||||
|
@ -39,10 +38,6 @@ type Config struct {
|
||||||
IdleTimeoutInSecond int `config:"idle_timeout_in_seconds"`
|
IdleTimeoutInSecond int `config:"idle_timeout_in_seconds"`
|
||||||
MaxConnectionPerHost int `config:"max_connection_per_node"`
|
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"`
|
Queues map[string]interface{} `config:"queues,omitempty"`
|
||||||
|
|
||||||
Consumer queue.ConsumerConfig `config:"consumer"`
|
Consumer queue.ConsumerConfig `config:"consumer"`
|
||||||
|
@ -74,7 +69,6 @@ func New(c *config.Config) (pipeline.Processor, error) {
|
||||||
MaxWorkers: 10,
|
MaxWorkers: 10,
|
||||||
MaxConnectionPerHost: 1,
|
MaxConnectionPerHost: 1,
|
||||||
IdleTimeoutInSecond: 5,
|
IdleTimeoutInSecond: 5,
|
||||||
BulkSizeInMb: 10,
|
|
||||||
DetectIntervalInMs: 10000,
|
DetectIntervalInMs: 10000,
|
||||||
Queues: map[string]interface{}{},
|
Queues: map[string]interface{}{},
|
||||||
|
|
||||||
|
@ -108,11 +102,6 @@ func New(c *config.Config) (pipeline.Processor, error) {
|
||||||
inFlightQueueConfigs: sync.Map{},
|
inFlightQueueConfigs: sync.Map{},
|
||||||
}
|
}
|
||||||
|
|
||||||
runner.bulkSizeInByte = 1048576 * runner.config.BulkSizeInMb
|
|
||||||
if runner.config.BulkSizeInKb > 0 {
|
|
||||||
runner.bulkSizeInByte = 1024 * runner.config.BulkSizeInKb
|
|
||||||
}
|
|
||||||
|
|
||||||
runner.wg = sync.WaitGroup{}
|
runner.wg = sync.WaitGroup{}
|
||||||
|
|
||||||
return &runner, nil
|
return &runner, nil
|
||||||
|
|
Loading…
Reference in New Issue