Removed unused params and properties
This commit is contained in:
parent
734b46274f
commit
1bff01ff4f
1 changed files with 6 additions and 8 deletions
|
|
@ -10,17 +10,15 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type sampleRecordProcessor struct {
|
type sampleRecordProcessor struct {
|
||||||
checkpointer kcl.Checkpointer
|
checkpointer kcl.Checkpointer
|
||||||
checkpointRetries int
|
checkpointFreq time.Duration
|
||||||
checkpointFreq time.Duration
|
largestPair kcl.SequencePair
|
||||||
largestPair kcl.SequencePair
|
lastCheckpoint time.Time
|
||||||
lastCheckpoint time.Time
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func newSampleRecordProcessor() *sampleRecordProcessor {
|
func newSampleRecordProcessor() *sampleRecordProcessor {
|
||||||
return &sampleRecordProcessor{
|
return &sampleRecordProcessor{
|
||||||
checkpointRetries: 5,
|
checkpointFreq: 60 * time.Second,
|
||||||
checkpointFreq: 60 * time.Second,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -47,7 +45,7 @@ func (srp *sampleRecordProcessor) ProcessRecords(records []kcl.Record) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if time.Now().Sub(srp.lastCheckpoint) > srp.checkpointFreq {
|
if time.Now().Sub(srp.lastCheckpoint) > srp.checkpointFreq {
|
||||||
srp.checkpointer.Checkpoint(srp.largestPair, srp.checkpointRetries)
|
srp.checkpointer.Checkpoint(srp.largestPair)
|
||||||
srp.lastCheckpoint = time.Now()
|
srp.lastCheckpoint = time.Now()
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue