Increased ttl time for pushed assets from 1 hour to 2 hours.

This commit is contained in:
Martin Edenhofer 2017-10-18 11:09:50 +02:00
parent fa83de523e
commit 136954f46a
3 changed files with 5 additions and 5 deletions

View file

@ -30,7 +30,7 @@ class Sessions::Backend::Base
return true if @asset_lookup[class_name][record_id].blank?
return true if @asset_lookup[class_name][record_id][:updated_at] < updated_at
return true if @asset_lookup[class_name][record_id][:pushed_at].blank?
return true if @asset_lookup[class_name][record_id][:pushed_at] < Time.zone.now - 1.hour
return true if @asset_lookup[class_name][record_id][:pushed_at] < Time.zone.now - 2.hours
false
end

View file

@ -53,7 +53,7 @@ class SessionBasicTicketTest < ActiveSupport::TestCase
assert_not(client1.asset_needed_by_updated_at?(ticket.class.to_s, ticket.id, ticket.updated_at))
assert_not(client2.asset_needed_by_updated_at?(ticket.class.to_s, ticket.id, ticket.updated_at))
travel 60.minutes
travel 120.minutes
assert(client1.asset_needed_by_updated_at?(ticket.class.to_s, ticket.id, ticket.updated_at))
client1.asset_push(ticket, {})
@ -75,7 +75,7 @@ class SessionBasicTicketTest < ActiveSupport::TestCase
assert_not(client1.asset_needed?(ticket))
assert_not(client2.asset_needed?(ticket))
travel 65.minutes
travel 125.minutes
assert(client1.asset_needed?(ticket))
client1.asset_push(ticket, {})
@ -153,7 +153,7 @@ class SessionBasicTicketTest < ActiveSupport::TestCase
assert_not(result1[1][:data][:assets][:Ticket][ticket3.id])
assert_equal(result1[1][:data][:assets][:Ticket][ticket4.id]['title'], ticket4.title)
travel 65.minutes
travel 125.minutes
ticket1.touch
result1 = client1.push
assert(result1, 'check ticket_overview_index - recall 8')

View file

@ -200,7 +200,7 @@ class SessionCollectionsTest < ActiveSupport::TestCase
assert(data[:assets])
assert_not(data[:assets][:Group])
travel 65.minutes
travel 125.minutes
client1 = Sessions::Backend::Collections::Group.new(agent1, assets, false, '123-1', 4)
data = client1.push