Reset event buffer after list.
This commit is contained in:
parent
ef71c4b2ec
commit
ca0a25e848
1 changed files with 7 additions and 4 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue