mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-16 08:45:22 +01:00
periodic scripts exeuction from leader master
This commit is contained in:
1 parent
b9e138713c
commit
ede876cfdb
47 files changed
+337
-225
No files matched your search
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
commands = append(commands, &commandVolumeList{})
|
||||
Commands = append(Commands, &commandVolumeList{})
|
||||
}
|
||||
|
||||
type commandVolumeList struct {
|
||||
@@ -29,11 +29,11 @@ func (c *commandVolumeList) Help() string {
|
||||
`
|
||||
}
|
||||
|
||||
func (c *commandVolumeList) Do(args []string, commandEnv *commandEnv, writer io.Writer) (err error) {
|
||||
func (c *commandVolumeList) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {
|
||||
|
||||
var resp *master_pb.VolumeListResponse
|
||||
ctx := context.Background()
|
||||
err = commandEnv.masterClient.WithClient(ctx, func(client master_pb.SeaweedClient) error {
|
||||
err = commandEnv.MasterClient.WithClient(ctx, func(client master_pb.SeaweedClient) error {
|
||||
resp, err = client.VolumeList(ctx, &master_pb.VolumeListRequest{})
|
||||
return err
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user