You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
463 B
22 lines
463 B
package filesys
|
|
|
|
import (
|
|
"context"
|
|
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
|
)
|
|
|
|
func (wfs *WFS) deleteFileChunks(chunks []*filer_pb.FileChunk) {
|
|
if len(chunks) == 0 {
|
|
return
|
|
}
|
|
|
|
var fileIds []string
|
|
for _, chunk := range chunks {
|
|
fileIds = append(fileIds, chunk.FileId)
|
|
}
|
|
|
|
wfs.withFilerClient(func(client filer_pb.SeaweedFilerClient) error {
|
|
deleteFileIds(context.Background(), wfs.option.GrpcDialOption, client, fileIds)
|
|
return nil
|
|
})
|
|
}
|