diff options
| author | chrislu <chris.lu@gmail.com> | 2022-08-22 00:00:51 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-08-22 00:00:51 -0700 |
| commit | f6b92b856196dcf356d1f0e7d65afbfd7d16966b (patch) | |
| tree | f72ee466b1e45e5f52e2c48ccd60e7f11983f31d | |
| parent | 3c8e95eeb33a97a094b6854ae928bbb1a767e1f6 (diff) | |
| download | seaweedfs-f6b92b856196dcf356d1f0e7d65afbfd7d16966b.tar.xz seaweedfs-f6b92b856196dcf356d1f0e7d65afbfd7d16966b.zip | |
refactor
| -rw-r--r-- | weed/command/filer_sync_jobs.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/weed/command/filer_sync_jobs.go b/weed/command/filer_sync_jobs.go index 0d4d83adb..3e9bb9f37 100644 --- a/weed/command/filer_sync_jobs.go +++ b/weed/command/filer_sync_jobs.go @@ -2,23 +2,22 @@ package command import ( "github.com/seaweedfs/seaweedfs/weed/glog" + "github.com/seaweedfs/seaweedfs/weed/pb" "github.com/seaweedfs/seaweedfs/weed/pb/filer_pb" "github.com/seaweedfs/seaweedfs/weed/util" "sync" ) -type MetadataProcessFunc func(resp *filer_pb.SubscribeMetadataResponse) error - type MetadataProcessor struct { activeJobs map[int64]*filer_pb.SubscribeMetadataResponse activeJobsLock sync.Mutex activeJobsCond *sync.Cond concurrencyLimit int - fn MetadataProcessFunc + fn pb.ProcessMetadataFunc processedTsWatermark int64 } -func NewMetadataProcessor(fn MetadataProcessFunc, concurrency int) *MetadataProcessor { +func NewMetadataProcessor(fn pb.ProcessMetadataFunc, concurrency int) *MetadataProcessor { t := &MetadataProcessor{ fn: fn, activeJobs: make(map[int64]*filer_pb.SubscribeMetadataResponse), |
