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
472 B

  1. package filesys
  2. import (
  3. "context"
  4. "github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
  5. )
  6. func (wfs *WFS) deleteFileChunks(ctx context.Context, chunks []*filer_pb.FileChunk) {
  7. if len(chunks) == 0 {
  8. return
  9. }
  10. var fileIds []string
  11. for _, chunk := range chunks {
  12. fileIds = append(fileIds, chunk.FileId)
  13. }
  14. wfs.WithFilerClient(ctx, func(client filer_pb.SeaweedFilerClient) error {
  15. deleteFileIds(ctx, wfs.option.GrpcDialOption, client, fileIds)
  16. return nil
  17. })
  18. }