importo 2.0.4 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/jobs/importo/application_job.rb +4 -0
- data/app/jobs/importo/purge_import_job.rb +14 -0
- data/lib/importo/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6005b4d69612846b48c464ea6dfe53d763498518201576610e26e5ee7b99a1a9
|
4
|
+
data.tar.gz: bf6b4711e93260528cb440217588155dd815874666e7296715e2878559153001
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3728c3639169ec860471b1a80f3b293c4ee987748f0004f26978a9f716ef1b9ad69ac48bb49a7cc2a42b90083ca89322100aab6ba3164b329accdb3a036a19d2
|
7
|
+
data.tar.gz: 047d674853e4facae068811e41579bc3c01af12ef9680c06151a80816bc8d0639e809607763d9be76d96cfb00a392236d623186887b22716ea2d0e63fabd81d8
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Importo
|
2
|
+
class PurgeImportJob < ApplicationJob
|
3
|
+
def perform(owner, months)
|
4
|
+
imports = Import.where(importo_ownable: owner, created_at: ..months.months.ago.beginning_of_day)
|
5
|
+
|
6
|
+
imports.each do |import|
|
7
|
+
import.original.purge
|
8
|
+
import.result.purge
|
9
|
+
end
|
10
|
+
|
11
|
+
imports.in_batches.destroy_all
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/lib/importo/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: importo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andre Meij
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-11-
|
12
|
+
date: 2022-11-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: caxlsx
|
@@ -274,6 +274,8 @@ files:
|
|
274
274
|
- app/importers/concerns/result_feedback.rb
|
275
275
|
- app/importers/concerns/revertable.rb
|
276
276
|
- app/importers/importo/base_importer.rb
|
277
|
+
- app/jobs/importo/application_job.rb
|
278
|
+
- app/jobs/importo/purge_import_job.rb
|
277
279
|
- app/mailers/importo/application_mailer.rb
|
278
280
|
- app/models/importo/application_record.rb
|
279
281
|
- app/models/importo/import.rb
|