Browse Source
refactor(notification_kafka): `parition` -> `partition` (#3663)
pull/3664/head
Ryan Russell
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
weed/replication/sub/notification_kafka.go
|
|
@ -146,11 +146,11 @@ func (progress *KafkaProgress) saveProgress() error { |
|
|
|
return nil |
|
|
|
} |
|
|
|
|
|
|
|
func (progress *KafkaProgress) setOffset(parition int32, offset int64) error { |
|
|
|
func (progress *KafkaProgress) setOffset(partition int32, offset int64) error { |
|
|
|
progress.Lock() |
|
|
|
defer progress.Unlock() |
|
|
|
|
|
|
|
progress.PartitionOffsets[parition] = offset |
|
|
|
progress.PartitionOffsets[partition] = offset |
|
|
|
if int(time.Now().Sub(progress.lastSaveTime).Seconds()) > progress.offsetSaveIntervalSeconds { |
|
|
|
return progress.saveProgress() |
|
|
|
} |
|
|
|