aboutsummaryrefslogtreecommitdiff
path: root/weed/filer2/filer_notify.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/filer2/filer_notify.go')
-rw-r--r--weed/filer2/filer_notify.go39
1 files changed, 0 insertions, 39 deletions
diff --git a/weed/filer2/filer_notify.go b/weed/filer2/filer_notify.go
deleted file mode 100644
index c37381116..000000000
--- a/weed/filer2/filer_notify.go
+++ /dev/null
@@ -1,39 +0,0 @@
-package filer2
-
-import (
- "github.com/chrislusf/seaweedfs/weed/glog"
- "github.com/chrislusf/seaweedfs/weed/notification"
- "github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
-)
-
-func (f *Filer) NotifyUpdateEvent(oldEntry, newEntry *Entry, deleteChunks bool) {
- var key string
- if oldEntry != nil {
- key = string(oldEntry.FullPath)
- } else if newEntry != nil {
- key = string(newEntry.FullPath)
- } else {
- return
- }
-
- if notification.Queue != nil {
-
- glog.V(3).Infof("notifying entry update %v", key)
-
- newParentPath := ""
- if newEntry != nil {
- newParentPath, _ = newEntry.FullPath.DirAndName()
- }
-
- notification.Queue.SendMessage(
- key,
- &filer_pb.EventNotification{
- OldEntry: oldEntry.ToProtoEntry(),
- NewEntry: newEntry.ToProtoEntry(),
- DeleteChunks: deleteChunks,
- NewParentPath: newParentPath,
- },
- )
-
- }
-}