Class: AeActiveJobState::DeleteOldJobStatesJob

Inherits:
ActiveJob::Base
  • Object
show all
Defined in:
lib/ae_active_job_state/delete_old_job_states_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(older_than_days: 30) ⇒ Object



5
6
7
# File 'lib/ae_active_job_state/delete_old_job_states_job.rb', line 5

def perform(older_than_days: 30)
  JobState.where('updated_at < ?', older_than_days.days.ago).destroy_all
end