Re-enable session activity update

This commit is contained in:
Fosco Marotto 2021-01-30 01:38:43 -05:00
parent 0587875a75
commit 8b701c11e3
1 changed files with 4 additions and 3 deletions

View File

@ -13,11 +13,12 @@ module SessionTrackingConcern
def set_session_activity
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
def session_needs_update?
# !current_session.nil? && current_session.updated_at < UPDATE_SIGN_IN_HOURS.hours.ago
false
!current_session.nil? && current_session.updated_at < UPDATE_SIGN_IN_HOURS.hours.ago
end
end