Added debug messages to get more details about issue on ci env.

This commit is contained in:
Martin Edenhofer 2015-05-02 13:57:20 +02:00
parent 4b7026ab4d
commit 752ed6d73f

View file

@ -24,12 +24,13 @@ class Sessions::Backend::TicketOverviewList
data = { list: overview_data, index: overview }
result.push data
}
puts "LOG A #{result.inspect}"
# no data exists
return if !result || result.empty?
# no change exists
return if @last_change == result
puts "LOG B #{result.inspect}"
# remember last state
@last_change = result
@ -44,19 +45,22 @@ class Sessions::Backend::TicketOverviewList
def push
# check interval
puts "LOG 1 #{@user.inspect}"
return if Sessions::CacheIn.get( self.client_key )
# reset check interval
puts "LOG 2 #{@ttl.seconds}"
Sessions::CacheIn.set( self.client_key, true, { expires_in: @ttl.seconds } )
# check if min one ticket has changed
last_ticket_change = Ticket.latest_change
puts "LOG 3 #{last_ticket_change}/#{@last_ticket_change}"
return if last_ticket_change == @last_ticket_change
@last_ticket_change = last_ticket_change
# load current data
items = self.load
puts "LOG 4 #{items.inspect}"
return if !items
# push overviews