aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2018-08-13 01:33:21 -0700
committerChris Lu <chris.lu@gmail.com>2018-08-13 01:33:21 -0700
commitae9b81c18fb754b78bcd2a20259216671394a52f (patch)
tree62db525b7031eb9c848796fbd69c2f0287e0957b
parent5c467083e51ae7c2491b933da95e71aeb3fe773e (diff)
downloadseaweedfs-ae9b81c18fb754b78bcd2a20259216671394a52f.tar.xz
seaweedfs-ae9b81c18fb754b78bcd2a20259216671394a52f.zip
fix tests
-rw-r--r--weed/filer2/filer_notify.go18
1 files changed, 11 insertions, 7 deletions
diff --git a/weed/filer2/filer_notify.go b/weed/filer2/filer_notify.go
index 2ce45db0e..a96d8fe4b 100644
--- a/weed/filer2/filer_notify.go
+++ b/weed/filer2/filer_notify.go
@@ -15,13 +15,17 @@ func (f *Filer) NotifyUpdateEvent(oldEntry, newEntry *Entry) {
return
}
- msgqueue.Queue.SendMessage(
- key,
- &filer_pb.EventNotification{
- OldEntry: toProtoEntry(oldEntry),
- NewEntry: toProtoEntry(newEntry),
- },
- )
+ if msgqueue.Queue != nil {
+
+ msgqueue.Queue.SendMessage(
+ key,
+ &filer_pb.EventNotification{
+ OldEntry: toProtoEntry(oldEntry),
+ NewEntry: toProtoEntry(newEntry),
+ },
+ )
+
+ }
}