delayed_paperclip 2.9.1 → 2.9.2
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/.gitignore +2 -2
- data/.travis.yml +5 -6
- data/Appraisals +1 -5
- data/CONTRIBUTING +0 -3
- data/README.md +43 -11
- data/Rakefile +0 -13
- data/delayed_paperclip.gemspec +3 -3
- data/gemfiles/3.2.gemfile +0 -1
- data/gemfiles/4.0.gemfile +0 -1
- data/gemfiles/4.1.gemfile +0 -1
- data/gemfiles/4.2.gemfile +0 -1
- data/lib/delayed_paperclip.rb +6 -7
- data/lib/delayed_paperclip/attachment.rb +12 -6
- data/lib/delayed_paperclip/jobs/active_job.rb +3 -5
- data/lib/delayed_paperclip/jobs/delayed_job.rb +3 -2
- data/lib/delayed_paperclip/jobs/resque.rb +2 -3
- data/lib/delayed_paperclip/jobs/sidekiq.rb +7 -1
- data/lib/delayed_paperclip/railtie.rb +1 -1
- data/lib/delayed_paperclip/url_generator.rb +19 -25
- data/lib/delayed_paperclip/version.rb +1 -1
- data/spec/delayed_paperclip/attachment_spec.rb +98 -26
- data/spec/delayed_paperclip/class_methods_spec.rb +20 -12
- data/spec/delayed_paperclip/instance_methods_spec.rb +8 -12
- data/spec/delayed_paperclip/url_generator_spec.rb +24 -24
- data/spec/delayed_paperclip_spec.rb +37 -22
- data/spec/integration/active_job_inline_spec.rb +3 -3
- data/spec/integration/active_job_resque_spec.rb +4 -7
- data/spec/integration/active_job_sidekiq_spec.rb +17 -18
- data/spec/integration/base_delayed_paperclip_spec.rb +5 -6
- data/spec/integration/delayed_job_spec.rb +3 -4
- data/spec/integration/examples/base.rb +33 -25
- data/spec/integration/resque_spec.rb +4 -6
- data/spec/integration/sidekiq_spec.rb +8 -11
- data/spec/spec_helper.rb +15 -0
- metadata +23 -19
- data/gemfiles/3.2.gemfile.lock +0 -162
- data/gemfiles/4.0.gemfile.lock +0 -156
- data/gemfiles/4.1.gemfile.lock +0 -156
- data/gemfiles/4.2.gemfile.lock +0 -181
- data/test/base_delayed_paperclip_test.rb +0 -254
- data/test/database.yml +0 -4
- data/test/test_helper.rb +0 -106
|
@@ -2,28 +2,35 @@ require 'spec_helper'
|
|
|
2
2
|
require 'resque'
|
|
3
3
|
|
|
4
4
|
describe DelayedPaperclip do
|
|
5
|
-
before :
|
|
5
|
+
before :each do
|
|
6
6
|
reset_dummy
|
|
7
7
|
end
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
DelayedPaperclip.options
|
|
12
|
-
:url_with_processing => true,
|
|
13
|
-
:processing_image_url => nil}
|
|
9
|
+
context "with Resque adapter" do
|
|
10
|
+
before :each do
|
|
11
|
+
DelayedPaperclip.options[:background_job_class] = DelayedPaperclip::Jobs::Resque
|
|
14
12
|
end
|
|
15
|
-
end
|
|
16
13
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
describe ".options" do
|
|
15
|
+
it ".options returns basic options" do
|
|
16
|
+
DelayedPaperclip.options.should == {:background_job_class => DelayedPaperclip::Jobs::Resque,
|
|
17
|
+
:url_with_processing => true,
|
|
18
|
+
:processing_image_url => nil,
|
|
19
|
+
:queue => "paperclip"}
|
|
20
|
+
end
|
|
20
21
|
end
|
|
21
|
-
end
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
describe ".processor" do
|
|
24
|
+
it ".processor returns processor" do
|
|
25
|
+
DelayedPaperclip.processor.should == DelayedPaperclip::Jobs::Resque
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe ".enqueue" do
|
|
30
|
+
it "delegates to processor" do
|
|
31
|
+
DelayedPaperclip::Jobs::Resque.expects(:enqueue_delayed_paperclip).with("Dummy", 1, :image)
|
|
32
|
+
DelayedPaperclip.enqueue("Dummy", 1, :image)
|
|
33
|
+
end
|
|
27
34
|
end
|
|
28
35
|
end
|
|
29
36
|
|
|
@@ -32,28 +39,36 @@ describe DelayedPaperclip do
|
|
|
32
39
|
|
|
33
40
|
it "finds dummy and calls #process_delayed!" do
|
|
34
41
|
dummy_stub = stub
|
|
35
|
-
dummy_stub.expects(:
|
|
42
|
+
dummy_stub.expects(:where).with(id: dummy.id).returns([dummy])
|
|
36
43
|
Dummy.expects(:unscoped).returns(dummy_stub)
|
|
37
44
|
dummy.image.expects(:process_delayed!)
|
|
38
45
|
DelayedPaperclip.process_job("Dummy", dummy.id, :image)
|
|
39
46
|
end
|
|
47
|
+
|
|
48
|
+
it "doesn't find dummy and it doesn't raise any exceptions" do
|
|
49
|
+
dummy_stub = stub
|
|
50
|
+
dummy_stub.expects(:where).with(id: dummy.id).returns([])
|
|
51
|
+
Dummy.expects(:unscoped).returns(dummy_stub)
|
|
52
|
+
expect do
|
|
53
|
+
DelayedPaperclip.process_job("Dummy", dummy.id, :image)
|
|
54
|
+
end.not_to raise_exception
|
|
55
|
+
end
|
|
40
56
|
end
|
|
41
57
|
|
|
42
58
|
describe "paperclip definitions" do
|
|
43
|
-
before :
|
|
59
|
+
before :each do
|
|
44
60
|
reset_dummy :paperclip => { styles: { thumbnail: "25x25"} }
|
|
45
61
|
end
|
|
46
62
|
|
|
47
63
|
it "returns paperclip options regardless of version" do
|
|
48
|
-
Dummy.paperclip_definitions.
|
|
64
|
+
expect(Dummy.paperclip_definitions).to eq({:image => { :styles => { :thumbnail => "25x25" },
|
|
49
65
|
:delayed => { :priority => 0,
|
|
50
66
|
:only_process => [],
|
|
51
67
|
:url_with_processing => true,
|
|
52
68
|
:processing_image_url => nil,
|
|
53
|
-
:queue =>
|
|
69
|
+
:queue => "paperclip"}
|
|
54
70
|
}
|
|
55
|
-
}
|
|
71
|
+
})
|
|
56
72
|
end
|
|
57
|
-
|
|
58
73
|
end
|
|
59
|
-
end
|
|
74
|
+
end
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
require 'spec_helper'
|
|
2
2
|
|
|
3
3
|
describe "ActiveJob inline" do
|
|
4
|
-
|
|
5
4
|
if defined? ActiveJob
|
|
6
|
-
before :
|
|
5
|
+
before :each do
|
|
7
6
|
DelayedPaperclip.options[:background_job_class] = DelayedPaperclip::Jobs::ActiveJob
|
|
7
|
+
ActiveJob::Base.queue_adapter = :inline
|
|
8
8
|
ActiveJob::Base.logger = nil
|
|
9
9
|
end
|
|
10
10
|
|
|
@@ -23,4 +23,4 @@ describe "ActiveJob inline" do
|
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
end
|
|
26
|
-
end
|
|
26
|
+
end
|
|
@@ -3,8 +3,7 @@ require 'resque'
|
|
|
3
3
|
|
|
4
4
|
if defined? ActiveJob
|
|
5
5
|
describe "Active Job with Resque backend" do
|
|
6
|
-
|
|
7
|
-
before :all do
|
|
6
|
+
before :each do
|
|
8
7
|
DelayedPaperclip.options[:background_job_class] = DelayedPaperclip::Jobs::ActiveJob
|
|
9
8
|
ActiveJob::Base.logger = nil
|
|
10
9
|
ActiveJob::Base.queue_adapter = :resque
|
|
@@ -22,10 +21,8 @@ if defined? ActiveJob
|
|
|
22
21
|
worker.process
|
|
23
22
|
end
|
|
24
23
|
|
|
25
|
-
def jobs_count
|
|
26
|
-
|
|
27
|
-
Resque.size(:paperclip)
|
|
24
|
+
def jobs_count(queue = :paperclip)
|
|
25
|
+
Resque.size(queue)
|
|
28
26
|
end
|
|
29
|
-
|
|
30
27
|
end
|
|
31
|
-
end
|
|
28
|
+
end
|
|
@@ -1,35 +1,34 @@
|
|
|
1
1
|
require 'spec_helper'
|
|
2
|
-
require 'sidekiq/
|
|
2
|
+
require 'sidekiq/testing'
|
|
3
3
|
|
|
4
4
|
describe "ActiveJob with Sidekiq backend" do
|
|
5
|
+
if defined? ActiveJob
|
|
6
|
+
before :each do
|
|
7
|
+
DelayedPaperclip.options[:background_job_class] = DelayedPaperclip::Jobs::ActiveJob
|
|
8
|
+
ActiveJob::Base.logger = nil
|
|
9
|
+
ActiveJob::Base.queue_adapter = :sidekiq
|
|
10
|
+
Sidekiq::Queues["paperclip"].clear
|
|
11
|
+
end
|
|
5
12
|
|
|
6
|
-
|
|
7
|
-
before :all do
|
|
8
|
-
DelayedPaperclip.options[:background_job_class] = DelayedPaperclip::Jobs::ActiveJob
|
|
9
|
-
ActiveJob::Base.logger = nil
|
|
10
|
-
ActiveJob::Base.queue_adapter = :sidekiq
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
let(:dummy) { Dummy.new(:image => File.open("#{ROOT}/spec/fixtures/12k.png")) }
|
|
13
|
+
let(:dummy) { Dummy.new(:image => File.open("#{ROOT}/spec/fixtures/12k.png")) }
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
describe "integration tests" do
|
|
16
|
+
include_examples "base usage"
|
|
17
|
+
end
|
|
17
18
|
end
|
|
18
|
-
end
|
|
19
19
|
|
|
20
20
|
def process_jobs
|
|
21
|
-
Sidekiq::
|
|
22
|
-
worker = job.
|
|
23
|
-
args = job
|
|
21
|
+
Sidekiq::Queues["paperclip"].each do |job|
|
|
22
|
+
worker = job["class"].constantize.new
|
|
23
|
+
args = job["args"]
|
|
24
24
|
begin
|
|
25
25
|
worker.perform(*args)
|
|
26
26
|
rescue # Assume sidekiq handle exception properly
|
|
27
27
|
end
|
|
28
|
-
job.delete
|
|
29
28
|
end
|
|
30
29
|
end
|
|
31
30
|
|
|
32
|
-
def jobs_count
|
|
33
|
-
Sidekiq::
|
|
31
|
+
def jobs_count(queue = "paperclip")
|
|
32
|
+
Sidekiq::Queues[queue].size
|
|
34
33
|
end
|
|
35
34
|
end
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'spec_helper'
|
|
2
2
|
|
|
3
3
|
describe "Base Delayed Paperclip Integration" do
|
|
4
|
-
before :
|
|
4
|
+
before :each do
|
|
5
5
|
DelayedPaperclip.options[:background_job_class] = DelayedPaperclip::Jobs::Resque
|
|
6
6
|
Resque.remove_queue(:paperclip)
|
|
7
7
|
end
|
|
@@ -14,16 +14,15 @@ describe "Base Delayed Paperclip Integration" do
|
|
|
14
14
|
|
|
15
15
|
describe "double save" do
|
|
16
16
|
before :each do
|
|
17
|
-
dummy.image_processing.should
|
|
17
|
+
dummy.image_processing.should be_falsey
|
|
18
18
|
dummy.image = File.open("#{ROOT}/spec/fixtures/12k.png")
|
|
19
19
|
dummy.save!
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
it "processing column remains true" do
|
|
23
|
-
dummy.image_processing.should
|
|
23
|
+
dummy.image_processing.should be_truthy
|
|
24
24
|
dummy.save!
|
|
25
|
-
dummy.image_processing.should
|
|
25
|
+
dummy.image_processing.should be_truthy
|
|
26
26
|
end
|
|
27
27
|
end
|
|
28
|
-
|
|
29
|
-
end
|
|
28
|
+
end
|
|
@@ -4,8 +4,7 @@ require 'delayed_job'
|
|
|
4
4
|
Delayed::Worker.backend = :active_record
|
|
5
5
|
|
|
6
6
|
describe "Delayed Job" do
|
|
7
|
-
|
|
8
|
-
before :all do
|
|
7
|
+
before :each do
|
|
9
8
|
DelayedPaperclip.options[:background_job_class] = DelayedPaperclip::Jobs::DelayedJob
|
|
10
9
|
build_delayed_jobs
|
|
11
10
|
end
|
|
@@ -34,7 +33,7 @@ describe "Delayed Job" do
|
|
|
34
33
|
Delayed::Worker.new.work_off
|
|
35
34
|
end
|
|
36
35
|
|
|
37
|
-
def jobs_count
|
|
36
|
+
def jobs_count(queue = nil)
|
|
38
37
|
Delayed::Job.count
|
|
39
38
|
end
|
|
40
39
|
|
|
@@ -52,4 +51,4 @@ describe "Delayed Job" do
|
|
|
52
51
|
table.timestamps null: true
|
|
53
52
|
end
|
|
54
53
|
end
|
|
55
|
-
end
|
|
54
|
+
end
|
|
@@ -12,10 +12,10 @@ shared_examples "base usage" do
|
|
|
12
12
|
|
|
13
13
|
it "allows normal paperclip functionality" do
|
|
14
14
|
Paperclip::Attachment.any_instance.expects(:post_process)
|
|
15
|
-
dummy.image.delay_processing?.should
|
|
16
|
-
dummy.image.post_processing.should
|
|
17
|
-
dummy.save.should
|
|
18
|
-
File.exists?(dummy.image.path).should
|
|
15
|
+
dummy.image.delay_processing?.should be_falsey
|
|
16
|
+
dummy.image.post_processing.should be_truthy
|
|
17
|
+
dummy.save.should be_truthy
|
|
18
|
+
File.exists?(dummy.image.path).should be_truthy
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
context "missing url" do
|
|
@@ -52,16 +52,16 @@ shared_examples "base usage" do
|
|
|
52
52
|
dummy.image.post_processing = true
|
|
53
53
|
end
|
|
54
54
|
it "has delay_processing is false" do
|
|
55
|
-
dummy.image.delay_processing?.should
|
|
55
|
+
dummy.image.delay_processing?.should be_falsey
|
|
56
56
|
end
|
|
57
57
|
|
|
58
58
|
it "post processing returns true" do
|
|
59
|
-
dummy.image.post_processing.should
|
|
59
|
+
dummy.image.post_processing.should be_truthy
|
|
60
60
|
end
|
|
61
61
|
|
|
62
62
|
it "writes the file" do
|
|
63
63
|
dummy.save
|
|
64
|
-
File.exists?(dummy.image.path).should
|
|
64
|
+
File.exists?(dummy.image.path).should be_truthy
|
|
65
65
|
end
|
|
66
66
|
end
|
|
67
67
|
|
|
@@ -73,16 +73,16 @@ shared_examples "base usage" do
|
|
|
73
73
|
end
|
|
74
74
|
|
|
75
75
|
it "delays processing" do
|
|
76
|
-
dummy.image.delay_processing?.should
|
|
76
|
+
dummy.image.delay_processing?.should be_truthy
|
|
77
77
|
end
|
|
78
78
|
|
|
79
79
|
it "post_processing is false" do
|
|
80
|
-
dummy.image.post_processing.should
|
|
80
|
+
dummy.image.post_processing.should be_falsey
|
|
81
81
|
end
|
|
82
82
|
|
|
83
83
|
it "has file after save" do
|
|
84
84
|
dummy.save
|
|
85
|
-
File.exists?(dummy.image.path).should
|
|
85
|
+
File.exists?(dummy.image.path).should be_truthy
|
|
86
86
|
end
|
|
87
87
|
|
|
88
88
|
end
|
|
@@ -98,9 +98,9 @@ shared_examples "base usage" do
|
|
|
98
98
|
describe "processing column not altered" do
|
|
99
99
|
it "resets after job finished" do
|
|
100
100
|
dummy.save!
|
|
101
|
-
dummy.image_processing?.should
|
|
101
|
+
dummy.image_processing?.should be_truthy
|
|
102
102
|
process_jobs
|
|
103
|
-
dummy.reload.image_processing?.should
|
|
103
|
+
dummy.reload.image_processing?.should be_falsey
|
|
104
104
|
end
|
|
105
105
|
|
|
106
106
|
context "with error" do
|
|
@@ -110,10 +110,10 @@ shared_examples "base usage" do
|
|
|
110
110
|
|
|
111
111
|
it "stays true even if errored" do
|
|
112
112
|
dummy.save!
|
|
113
|
-
dummy.image_processing?.should
|
|
113
|
+
dummy.image_processing?.should be_truthy
|
|
114
114
|
process_jobs
|
|
115
|
-
dummy.image_processing?.should
|
|
116
|
-
dummy.reload.image_processing?.should
|
|
115
|
+
dummy.image_processing?.should be_truthy
|
|
116
|
+
dummy.reload.image_processing?.should be_truthy
|
|
117
117
|
end
|
|
118
118
|
end
|
|
119
119
|
end
|
|
@@ -121,10 +121,10 @@ shared_examples "base usage" do
|
|
|
121
121
|
# TODO: test appears redundant
|
|
122
122
|
describe "processing is true for new record" do
|
|
123
123
|
it "is true" do
|
|
124
|
-
dummy.image_processing?.should
|
|
125
|
-
dummy.new_record?.should
|
|
124
|
+
dummy.image_processing?.should be_falsey
|
|
125
|
+
dummy.new_record?.should be_truthy
|
|
126
126
|
dummy.save!
|
|
127
|
-
dummy.reload.image_processing?.should
|
|
127
|
+
dummy.reload.image_processing?.should be_truthy
|
|
128
128
|
end
|
|
129
129
|
end
|
|
130
130
|
|
|
@@ -176,7 +176,7 @@ shared_examples "base usage" do
|
|
|
176
176
|
context "paperclip callback" do
|
|
177
177
|
before :each do
|
|
178
178
|
Dummy.send(:define_method, :done_processing) { puts 'done' }
|
|
179
|
-
Dummy.after_image_post_process :done_processing
|
|
179
|
+
Dummy.send(:after_image_post_process, :done_processing)
|
|
180
180
|
Dummy.any_instance.expects(:done_processing).once
|
|
181
181
|
end
|
|
182
182
|
|
|
@@ -243,7 +243,7 @@ shared_examples "base usage" do
|
|
|
243
243
|
dummy.save!
|
|
244
244
|
process_jobs
|
|
245
245
|
dummy.reload.image.url(:thumbnail).should start_with("/system/dummies/images/000/000/001/thumbnail/12k.jpg")
|
|
246
|
-
File.exists?(dummy.image.path).should
|
|
246
|
+
File.exists?(dummy.image.path).should be_truthy
|
|
247
247
|
end
|
|
248
248
|
end
|
|
249
249
|
|
|
@@ -259,9 +259,9 @@ shared_examples "base usage" do
|
|
|
259
259
|
|
|
260
260
|
it "does not increase jobs count" do
|
|
261
261
|
dummy.save!
|
|
262
|
-
dummy.image_processing?.should
|
|
262
|
+
dummy.image_processing?.should be_truthy
|
|
263
263
|
process_jobs
|
|
264
|
-
dummy.reload.image_processing?.should
|
|
264
|
+
dummy.reload.image_processing?.should be_falsey
|
|
265
265
|
|
|
266
266
|
Paperclip::Attachment.any_instance.expects(:reprocess!).once
|
|
267
267
|
|
|
@@ -269,8 +269,8 @@ shared_examples "base usage" do
|
|
|
269
269
|
dummy.image.reprocess_without_delay!(:thumbnail)
|
|
270
270
|
existing_jobs.should == jobs_count
|
|
271
271
|
|
|
272
|
-
dummy.image_processing?.should
|
|
273
|
-
File.exists?(dummy.image.path).should
|
|
272
|
+
dummy.image_processing?.should be_falsey
|
|
273
|
+
File.exists?(dummy.image.path).should be_truthy
|
|
274
274
|
end
|
|
275
275
|
|
|
276
276
|
end
|
|
@@ -312,5 +312,13 @@ shared_examples "base usage" do
|
|
|
312
312
|
end
|
|
313
313
|
end
|
|
314
314
|
|
|
315
|
-
|
|
315
|
+
describe "queue option" do
|
|
316
|
+
it "enqueues job with given queue name" do
|
|
317
|
+
reset_dummy :queue => "custom"
|
|
316
318
|
|
|
319
|
+
expect do
|
|
320
|
+
dummy.save!
|
|
321
|
+
end.to change { jobs_count("custom") }.by(1)
|
|
322
|
+
end
|
|
323
|
+
end
|
|
324
|
+
end
|
|
@@ -2,8 +2,7 @@ require 'spec_helper'
|
|
|
2
2
|
require 'resque'
|
|
3
3
|
|
|
4
4
|
describe "Resque" do
|
|
5
|
-
|
|
6
|
-
before :all do
|
|
5
|
+
before :each do
|
|
7
6
|
DelayedPaperclip.options[:background_job_class] = DelayedPaperclip::Jobs::Resque
|
|
8
7
|
Resque.remove_queue(:paperclip)
|
|
9
8
|
end
|
|
@@ -33,8 +32,7 @@ describe "Resque" do
|
|
|
33
32
|
worker.process
|
|
34
33
|
end
|
|
35
34
|
|
|
36
|
-
def jobs_count
|
|
37
|
-
Resque.size(
|
|
35
|
+
def jobs_count(queue = :paperclip)
|
|
36
|
+
Resque.size(queue)
|
|
38
37
|
end
|
|
39
|
-
|
|
40
|
-
end
|
|
38
|
+
end
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
require 'spec_helper'
|
|
2
|
-
require 'sidekiq/
|
|
2
|
+
require 'sidekiq/testing'
|
|
3
3
|
|
|
4
4
|
describe "Sidekiq" do
|
|
5
|
-
|
|
6
|
-
before :all do
|
|
5
|
+
before :each do
|
|
7
6
|
Sidekiq.logger.level = Logger::ERROR
|
|
8
7
|
DelayedPaperclip.options[:background_job_class] = DelayedPaperclip::Jobs::Sidekiq
|
|
9
|
-
Sidekiq::
|
|
8
|
+
Sidekiq::Queues["paperclip"].clear
|
|
10
9
|
end
|
|
11
10
|
|
|
12
11
|
let(:dummy) { Dummy.new(:image => File.open("#{ROOT}/spec/fixtures/12k.png")) }
|
|
@@ -30,19 +29,17 @@ describe "Sidekiq" do
|
|
|
30
29
|
end
|
|
31
30
|
|
|
32
31
|
def process_jobs
|
|
33
|
-
Sidekiq::
|
|
34
|
-
worker = job.
|
|
35
|
-
args = job
|
|
32
|
+
Sidekiq::Queues["paperclip"].each do |job|
|
|
33
|
+
worker = job["class"].constantize.new
|
|
34
|
+
args = job["args"]
|
|
36
35
|
begin
|
|
37
36
|
worker.perform(*args)
|
|
38
37
|
rescue # Assume sidekiq handle exception properly
|
|
39
38
|
end
|
|
40
|
-
job.delete
|
|
41
39
|
end
|
|
42
40
|
end
|
|
43
41
|
|
|
44
|
-
def jobs_count
|
|
45
|
-
Sidekiq::
|
|
42
|
+
def jobs_count(queue = "paperclip")
|
|
43
|
+
Sidekiq::Queues[queue].size
|
|
46
44
|
end
|
|
47
|
-
|
|
48
45
|
end
|