sidekiq_bulk_job 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sidekiq_bulk_job/job_retry.rb +8 -3
- data/lib/sidekiq_bulk_job/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1acd50d98090657e0c060fd63d2d1733214b964447a233b7a2a4a83b65e54db2
|
4
|
+
data.tar.gz: be8c7002b9200fcf374067ff49aa0208866ba50f218beedc91b021c42ecfa2b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9b0fee851c8445ef0bc811a16f95716b5c772d3542b83be95c24c60246c0ea91cae491f1b428f8681cfba9bf3464c032779af4cc14664a550ace37fec1d3bff
|
7
|
+
data.tar.gz: bcf7ceea6a57f54c414c4a1194b5feb5880aaa3fabbe48f72d95016b3bdce059652cb21ed1e511363d56d17519e78bc0075be9d06b0e143d4709fab4f050f811
|
@@ -14,7 +14,7 @@ module SidekiqBulkJob
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def push(options={})
|
17
|
-
opts =
|
17
|
+
opts = job_options(options)
|
18
18
|
queue_as = queue(@klass) || :default
|
19
19
|
begin
|
20
20
|
@handler.local(SidekiqBulkJob::BulkJob, opts, queue_as) do
|
@@ -26,9 +26,14 @@ module SidekiqBulkJob
|
|
26
26
|
|
27
27
|
protected
|
28
28
|
|
29
|
-
def
|
29
|
+
def job_options(options={})
|
30
30
|
# 0 retry: no retry and dead queue
|
31
|
-
{ 'class' => @klass.to_s, 'args' => @args, 'retry' => 0 }
|
31
|
+
opts = { 'class' => @klass.to_s, 'args' => @args, 'retry' => 0 }.merge(options)
|
32
|
+
if Sidekiq::VERSION >= "6.0.2"
|
33
|
+
Sidekiq.dump_json(opts)
|
34
|
+
else
|
35
|
+
opts
|
36
|
+
end
|
32
37
|
end
|
33
38
|
|
34
39
|
def queue(woker)
|