Sha256: c868a54b2548a99326a894d9691a7462451a7c33a85d13600625bdf314613cae
Contents?: true
Size: 345 Bytes
Versions: 14
Compression:
Stored size: 345 Bytes
Contents
module Importo class PurgeImportJob < ApplicationJob def perform(owner, months) imports = Import.where(importo_ownable: owner, created_at: ..months.months.ago.beginning_of_day) imports.each do |import| import.original.purge import.result.purge end imports.in_batches.destroy_all end end end
Version data entries
14 entries across 14 versions & 1 rubygems