diff options
| author | chrislu <chris.lu@gmail.com> | 2022-08-30 13:37:05 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-08-30 13:37:05 -0700 |
| commit | 7eb121d5ae1412aec7001533e76cf1070e74b5ef (patch) | |
| tree | 65cb4c0dcc3a4ace8518de17e80e8d517f6a8d0d | |
| parent | 77098de69ae64c673e7faf4a5c29bd563dbe0c2e (diff) | |
| download | seaweedfs-7eb121d5ae1412aec7001533e76cf1070e74b5ef.tar.xz seaweedfs-7eb121d5ae1412aec7001533e76cf1070e74b5ef.zip | |
print process before do the work
| -rw-r--r-- | weed/shell/command_fs_meta_load.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/weed/shell/command_fs_meta_load.go b/weed/shell/command_fs_meta_load.go index 1de569788..3bd10c1e9 100644 --- a/weed/shell/command_fs_meta_load.go +++ b/weed/shell/command_fs_meta_load.go @@ -83,6 +83,13 @@ func (c *commandFsMetaLoad) Do(args []string, commandEnv *CommandEnv, writer io. return err } + if *verbose || lastLogTime.Add(time.Second).Before(time.Now()) { + if !*verbose { + lastLogTime = time.Now() + } + fmt.Fprintf(writer, "load %s\n", util.FullPath(fullEntry.Dir).Child(fullEntry.Entry.Name)) + } + fullEntry.Entry.Name = strings.ReplaceAll(fullEntry.Entry.Name, "/", "x") if err := filer_pb.CreateEntry(client, &filer_pb.CreateEntryRequest{ Directory: fullEntry.Dir, @@ -91,13 +98,6 @@ func (c *commandFsMetaLoad) Do(args []string, commandEnv *CommandEnv, writer io. return err } - if *verbose || lastLogTime.Add(time.Second).Before(time.Now()) { - if !*verbose { - lastLogTime = time.Now() - } - fmt.Fprintf(writer, "load %s\n", util.FullPath(fullEntry.Dir).Child(fullEntry.Entry.Name)) - } - if fullEntry.Entry.IsDirectory { dirCount++ } else { |
