diff --git a/weed/command/filer_sync_jobs.go b/weed/command/filer_sync_jobs.go index 3e9bb9f37..50428a3ad 100644 --- a/weed/command/filer_sync_jobs.go +++ b/weed/command/filer_sync_jobs.go @@ -41,12 +41,11 @@ func (t *MetadataProcessor) AddSyncJob(resp *filer_pb.SubscribeMetadataResponse) t.activeJobs[resp.TsNs] = resp go func() { - util.RetryForever("metadata processor", func() error { + if err := util.Retry("metadata processor", func() error { return t.fn(resp) - }, func(err error) bool { + }); err != nil { glog.Errorf("process %v: %v", resp, err) - return true - }) + } t.activeJobsLock.Lock() defer t.activeJobsLock.Unlock()