mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-20 04:45:16 +08:00
re-ordering
This commit is contained in:
@@ -93,17 +93,8 @@ func runFilerRemoteSynchronize(cmd *Command, args []string) bool {
|
|||||||
*remoteSyncOptions.readChunkFromFiler,
|
*remoteSyncOptions.readChunkFromFiler,
|
||||||
)
|
)
|
||||||
|
|
||||||
if dir != "" {
|
storageName := *remoteSyncOptions.createBucketAt
|
||||||
fmt.Printf("synchronize %s to remote storage...\n", dir)
|
if storageName != "" {
|
||||||
util.RetryForever("filer.remote.sync "+dir, func() error {
|
|
||||||
return followUpdatesAndUploadToRemote(&remoteSyncOptions, filerSource, dir)
|
|
||||||
}, func(err error) bool {
|
|
||||||
if err != nil {
|
|
||||||
glog.Errorf("synchronize %s: %v", dir, err)
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
remoteSyncOptions.bucketsDir = "/buckets"
|
remoteSyncOptions.bucketsDir = "/buckets"
|
||||||
// check buckets again
|
// check buckets again
|
||||||
@@ -116,8 +107,6 @@ func runFilerRemoteSynchronize(cmd *Command, args []string) bool {
|
|||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
|
||||||
storageName := *remoteSyncOptions.createBucketAt
|
|
||||||
if storageName != "" {
|
|
||||||
fmt.Printf("synchronize %s, default new bucket creation in %s ...\n", remoteSyncOptions.bucketsDir, storageName)
|
fmt.Printf("synchronize %s, default new bucket creation in %s ...\n", remoteSyncOptions.bucketsDir, storageName)
|
||||||
util.RetryForever("filer.remote.sync buckets "+storageName, func() error {
|
util.RetryForever("filer.remote.sync buckets "+storageName, func() error {
|
||||||
return remoteSyncOptions.followBucketUpdatesAndUploadToRemote(filerSource)
|
return remoteSyncOptions.followBucketUpdatesAndUploadToRemote(filerSource)
|
||||||
@@ -129,5 +118,17 @@ func runFilerRemoteSynchronize(cmd *Command, args []string) bool {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if dir != "" {
|
||||||
|
fmt.Printf("synchronize %s to remote storage...\n", dir)
|
||||||
|
util.RetryForever("filer.remote.sync "+dir, func() error {
|
||||||
|
return followUpdatesAndUploadToRemote(&remoteSyncOptions, filerSource, dir)
|
||||||
|
}, func(err error) bool {
|
||||||
|
if err != nil {
|
||||||
|
glog.Errorf("synchronize %s: %v", dir, err)
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user