Reset event buffer after list.

This commit is contained in:
Martin Edenhofer 2013-06-19 14:23:04 +02:00
parent ef71c4b2ec
commit ca0a25e848

View file

@ -11,7 +11,13 @@ class Observer::Ticket::Notification < ActiveRecord::Observer
# return if we run import mode # return if we run import mode
return if Setting.get('import_mode') return if Setting.get('import_mode')
EventBuffer.list.each { |event| # get buffer
list = EventBuffer.list
# reset buffer
EventBuffer.reset
list.each { |event|
# get current state of objects # get current state of objects
if event[:name] == 'Ticket::Article' if event[:name] == 'Ticket::Article'
@ -158,9 +164,6 @@ class Observer::Ticket::Notification < ActiveRecord::Observer
end end
end end
} }
# reset buffer
EventBuffer.reset
end end
def self.send_notify(data, ticket, article) def self.send_notify(data, ticket, article)