From ae9b81c18fb754b78bcd2a20259216671394a52f Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Mon, 13 Aug 2018 01:33:21 -0700 Subject: [PATCH] fix tests --- weed/filer2/filer_notify.go | 18 +++++++++++------- 1 file 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), + }, + ) + + } }