diff options
| author | Chris Lu <chris.lu@gmail.com> | 2018-08-13 01:33:21 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2018-08-13 01:33:21 -0700 |
| commit | ae9b81c18fb754b78bcd2a20259216671394a52f (patch) | |
| tree | 62db525b7031eb9c848796fbd69c2f0287e0957b | |
| parent | 5c467083e51ae7c2491b933da95e71aeb3fe773e (diff) | |
| download | seaweedfs-ae9b81c18fb754b78bcd2a20259216671394a52f.tar.xz seaweedfs-ae9b81c18fb754b78bcd2a20259216671394a52f.zip | |
fix tests
| -rw-r--r-- | weed/filer2/filer_notify.go | 18 |
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), + }, + ) + + } } |
