Class: SignIn::DeleteExpiredSessionsJob

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::Job
Defined in:
app/sidekiq/sign_in/delete_expired_sessions_job.rb

Instance Method Summary collapse

Instance Method Details

#expired_oauth_sessionsObject (private)



17
18
19
# File 'app/sidekiq/sign_in/delete_expired_sessions_job.rb', line 17

def expired_oauth_sessions
  OAuthSession.where(refresh_expiration: time_in_past)
end

#performObject



7
8
9
# File 'app/sidekiq/sign_in/delete_expired_sessions_job.rb', line 7

def perform
  expired_oauth_sessions.destroy_all
end

#time_in_pastObject (private)



13
14
15
# File 'app/sidekiq/sign_in/delete_expired_sessions_job.rb', line 13

def time_in_past
  ...Time.zone.now
end