importo 3.0.19 → 3.0.21

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2e37a58ff77d3eae705e41d35a11505ab8c9e4a595c95f3df9697bcc96726a6b
4
- data.tar.gz: 3436a1df14ac457d6eb3d62f70f87a7bd045481c144d12310ecb70a2e64be258
3
+ metadata.gz: bcca807f9c6f4ca09145b27128b1df2564b226bae7ff922618d399298cf8c231
4
+ data.tar.gz: b63912b0490807c5f99dc6928dd69b189cfcd0b92611ac6982d27c45a64b33e4
5
5
  SHA512:
6
- metadata.gz: f067df4453f21d32e6fa79addc463d33150c3e23bb53e9f9736a440af097dfec656af13ae1a83a208f759fea436f895367e2ab5730c4fc2d19ae306a38aa9a75
7
- data.tar.gz: 2c8857c902b0f5db54e7aaef64c46c3b66a430fc74db79782a43ba6e3358529c934c5f4761ade1b8a6a2ec4f73d71c2345634c1f3a29d9565df4fc10ad73029c
6
+ metadata.gz: 9b01d49b3e56b5823331572c42cccf441325aae495699bc7d52ecb1fb7aaf6468f685ffbfe3412ebc0f64c9d0c34b99f7340f21f420ce655d7804a0aad5beeaa
7
+ data.tar.gz: 553dadb41cbe13aae4857265964fd3cf449c641f0bc199938b22db259bc3ce897ea7a34b340f2bb4bf7380647ec5f6a216e4efc0a378d15714bb89f38669e0ce
@@ -0,0 +1,9 @@
1
+ module Importo
2
+ class ImportRevertJob
3
+ include Sidekiq::Job
4
+
5
+ def perform(import_id)
6
+ RevertService.perform(import: Import.find(import_id))
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module Importo
2
+ class ImportScheduleJob
3
+ include Sidekiq::Job
4
+
5
+ def perform(import_id)
6
+ ImportService.perform(import: Import.find(import_id))
7
+ end
8
+ end
9
+ end
@@ -111,13 +111,11 @@ module Importo
111
111
  private
112
112
 
113
113
  def schedule_import
114
- # Since servitium isn't ActiveJob we can't implement a wait, this should be replaced
115
- sleep(1)
116
- ImportService.perform_later(import: self)
114
+ ImportScheduleJob.perform_in(5.seconds, id)
117
115
  end
118
116
 
119
117
  def schedule_revert
120
- RevertService.perform_later(import: self)
118
+ ImportRevertJob.perform_in(5.seconds, id)
121
119
  end
122
120
  end
123
121
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Importo
4
- VERSION = "3.0.19"
4
+ VERSION = "3.0.21"
5
5
  end
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.19
4
+ version: 3.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andre Meij
@@ -320,6 +320,8 @@ files:
320
320
  - app/importers/importo/import_job_callback.rb
321
321
  - app/jobs/importo/application_job.rb
322
322
  - app/jobs/importo/import_job.rb
323
+ - app/jobs/importo/import_revert_job.rb
324
+ - app/jobs/importo/import_schedule_job.rb
323
325
  - app/jobs/importo/import_scheduled_job.rb
324
326
  - app/jobs/importo/purge_import_job.rb
325
327
  - app/mailers/importo/application_mailer.rb