importo 3.0.15 → 3.0.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/adapters/importo/sidekiq_batch_adapter.rb +1 -1
- data/app/importers/concerns/importable.rb +3 -2
- data/app/importers/importo/import_job_callback.rb +1 -1
- data/app/jobs/importo/import_job.rb +2 -2
- data/lib/importo/test_helpers.rb +1 -1
- data/lib/importo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67757044a87ce6eda6eceddd937b93404eda3cc979298f2d22316ea6db0e6eb1
|
4
|
+
data.tar.gz: 603c9602c07ac03a0fab0ed20f9dc81fec5df0bfb153f758add2d05f29bd418e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '070083420acdf0dd06ab2b59c1595e4e76906b8594944ac00c091baf82c9465efd56c8a90b270d368d7f2571322ee6ec5134195f3e83f4b1764bb97880ad9015'
|
7
|
+
data.tar.gz: 744f9d63c5d552c673ab7bb4e83a147605e8c1558e60e3545a95e298cac6683114e96385d74794db6ac1fff02ab4e963d214c3f2a720f77e9653c6a1c8d2233c
|
@@ -132,6 +132,7 @@ module Importable
|
|
132
132
|
batch.on_success("Importo::ImportJobCallback")
|
133
133
|
|
134
134
|
batch.add do
|
135
|
+
bid = batch.bid
|
135
136
|
column_with_delay = columns.select { |k, v| v.delay.present? }
|
136
137
|
loop_data_rows do |attributes, index|
|
137
138
|
if column_with_delay.present?
|
@@ -140,8 +141,8 @@ module Importable
|
|
140
141
|
v.delay.call(attributes[k])
|
141
142
|
end.compact
|
142
143
|
end
|
143
|
-
Importo::ImportJob.set(wait_until: (delay.max * index).seconds.from_now).perform_async(JSON.dump(attributes), index, import.id) if delay.present?
|
144
|
-
Importo::ImportJob.perform_async(JSON.dump(attributes), index, import.id) unless delay.present?
|
144
|
+
Importo::ImportJob.set(wait_until: (delay.max * index).seconds.from_now).perform_async(JSON.dump(attributes), index, import.id, bid) if delay.present?
|
145
|
+
Importo::ImportJob.perform_async(JSON.dump(attributes), index, import.id, bid) unless delay.present?
|
145
146
|
end
|
146
147
|
end
|
147
148
|
|
@@ -20,7 +20,7 @@ module Importo
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
-
def perform(attributes, index, import_id)
|
23
|
+
def perform(attributes, index, import_id, bid)
|
24
24
|
self.class.execute_row(attributes, index, import_id, false, bid)
|
25
25
|
end
|
26
26
|
|
@@ -33,7 +33,7 @@ module Importo
|
|
33
33
|
batch = Importo::SidekiqBatchAdapter.find(bid)
|
34
34
|
|
35
35
|
if !import.completed? && import.can_complete? && batch.finished?
|
36
|
-
ImportJobCallback.new.
|
36
|
+
ImportJobCallback.new.on_success(batch.status, {import_id: import_id})
|
37
37
|
end
|
38
38
|
end
|
39
39
|
end
|
data/lib/importo/test_helpers.rb
CHANGED
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: 3.0.
|
4
|
+
version: 3.0.16
|
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: 2024-09-
|
12
|
+
date: 2024-09-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: caxlsx
|