Removed unused params and properties

This commit is contained in:
Xavi Ramirez 2017-08-06 05:44:51 +00:00
parent 734b46274f
commit 1bff01ff4f

View file

@ -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