Re-enable session activity update
This commit is contained in:
parent
0587875a75
commit
8b701c11e3
|
@ -13,11 +13,12 @@ module SessionTrackingConcern
|
||||||
|
|
||||||
def set_session_activity
|
def set_session_activity
|
||||||
return unless session_needs_update?
|
return unless session_needs_update?
|
||||||
current_session.touch
|
conn = ActiveRecord::Base.connection
|
||||||
|
conn.stick_to_master!
|
||||||
|
conn.exec_query "update session_activations set updated_at = NOW() where id = #{current_session.id}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def session_needs_update?
|
def session_needs_update?
|
||||||
# !current_session.nil? && current_session.updated_at < UPDATE_SIGN_IN_HOURS.hours.ago
|
!current_session.nil? && current_session.updated_at < UPDATE_SIGN_IN_HOURS.hours.ago
|
||||||
false
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue