micro_q 0.7.0 → 0.8.0
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 +7 -0
- data/.ruby-version +1 -0
- data/.travis.yml +9 -1
- data/README.md +5 -2
- data/lib/micro_q/config.rb +1 -0
- data/lib/micro_q/dsl.rb +41 -16
- data/lib/micro_q/manager/default.rb +53 -7
- data/lib/micro_q/middleware/chain.rb +15 -2
- data/lib/micro_q/middleware/client/statistics.rb +22 -0
- data/lib/micro_q/middleware/server/retry.rb +20 -5
- data/lib/micro_q/middleware/server/statistics.rb +22 -0
- data/lib/micro_q/middleware/server/timeout.rb +19 -0
- data/lib/micro_q/middleware/util.rb +21 -0
- data/lib/micro_q/queue/default.rb +25 -18
- data/lib/micro_q/queue/redis.rb +2 -2
- data/lib/micro_q/statistics/base.rb +15 -0
- data/lib/micro_q/statistics/default.rb +18 -0
- data/lib/micro_q/statistics/redis.rb +23 -0
- data/lib/micro_q/version.rb +1 -1
- data/lib/micro_q/worker/standard.rb +20 -10
- data/lib/micro_q.rb +25 -3
- data/micro_q.gemspec +1 -1
- data/spec/helpers/methods_examples.rb +1 -1
- data/spec/helpers/queues_examples.rb +4 -4
- data/spec/lib/config_spec.rb +4 -0
- data/spec/lib/dsl_spec.rb +14 -2
- data/spec/lib/manager/default_spec.rb +90 -16
- data/spec/lib/methods/action_mailer_spec.rb +2 -2
- data/spec/lib/methods/active_record_spec.rb +2 -2
- data/spec/lib/methods/class_spec.rb +2 -2
- data/spec/lib/methods/instance_spec.rb +2 -2
- data/spec/lib/micro_q_spec.rb +13 -2
- data/spec/lib/middleware/chain_spec.rb +83 -6
- data/spec/lib/middleware/client/statistics_spec.rb +53 -0
- data/spec/lib/middleware/server/connection_spec.rb +1 -1
- data/spec/lib/middleware/server/retry_spec.rb +33 -4
- data/spec/lib/middleware/server/statistics_spec.rb +53 -0
- data/spec/lib/middleware/server/timeout_spec.rb +40 -0
- data/spec/lib/proxies/base_spec.rb +2 -2
- data/spec/lib/proxies/instance_spec.rb +1 -1
- data/spec/lib/queue/default_spec.rb +2 -4
- data/spec/lib/queue/redis_spec.rb +2 -4
- data/spec/lib/statistics/default_spec.rb +73 -0
- data/spec/lib/statistics/redis_spec.rb +73 -0
- data/spec/lib/util_spec.rb +1 -1
- data/spec/lib/worker/standard_spec.rb +26 -11
- data/spec/lib/wrappers/action_mailer_spec.rb +2 -2
- data/spec/spec_helper.rb +1 -1
- metadata +49 -58
- data/lib/micro_q/methods.rb +0 -7
- data/lib/micro_q/wrappers.rb +0 -1
@@ -18,7 +18,7 @@ describe MicroQ::Queue::Default do
|
|
18
18
|
describe '#sync_push' do
|
19
19
|
it_behaves_like 'Queue#sync_push'
|
20
20
|
|
21
|
-
describe 'when given the
|
21
|
+
describe 'when given the \'when\' key' do
|
22
22
|
let(:worker) { [item, { 'when' => (Time.now + 100).to_i }] }
|
23
23
|
|
24
24
|
it 'should add to the later' do
|
@@ -37,9 +37,7 @@ describe MicroQ::Queue::Default do
|
|
37
37
|
end
|
38
38
|
|
39
39
|
it 'should process the middleware chain' do
|
40
|
-
MicroQ.middleware.client.should_receive(:call) do |
|
41
|
-
w.should == 'MyWorker'
|
42
|
-
|
40
|
+
MicroQ.middleware.client.should_receive(:call) do |payload, options|
|
43
41
|
payload['class'].should == 'MyWorker'
|
44
42
|
payload['args'].should == [4]
|
45
43
|
options['when'].should == (Time.now + 100).to_i
|
@@ -6,7 +6,7 @@ describe MicroQ::Queue::Redis do
|
|
6
6
|
describe '#sync_push' do
|
7
7
|
it_behaves_like 'Queue#sync_push'
|
8
8
|
|
9
|
-
describe 'when given the
|
9
|
+
describe 'when given the \'when\' key' do
|
10
10
|
let(:worker) { [item, { 'when' => (Time.now + 100).to_i }] }
|
11
11
|
|
12
12
|
it 'should add to the later' do
|
@@ -22,9 +22,7 @@ describe MicroQ::Queue::Redis do
|
|
22
22
|
end
|
23
23
|
|
24
24
|
it 'should process the middleware chain' do
|
25
|
-
MicroQ.middleware.client.should_receive(:call) do |
|
26
|
-
w.should == 'MyWorker'
|
27
|
-
|
25
|
+
MicroQ.middleware.client.should_receive(:call) do |payload, options|
|
28
26
|
payload['class'].should == 'MyWorker'
|
29
27
|
payload['args'].should == [4]
|
30
28
|
options['when'].should == (Time.now + 100).to_i
|
@@ -0,0 +1,73 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe MicroQ::Statistics::Default do
|
4
|
+
describe '.stats' do
|
5
|
+
it 'should yield a default statistics obj' do
|
6
|
+
MicroQ::Statistics::Default.stats {|stats| stats.class.should == MicroQ::Statistics::Default }
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'should memoize the instance' do
|
10
|
+
items = []
|
11
|
+
2.times { MicroQ::Statistics::Default.stats {|stats| items << stats.object_id } }
|
12
|
+
|
13
|
+
items.uniq.length.should == 1
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
describe '.instance' do
|
18
|
+
it 'should be the statistics obj' do
|
19
|
+
MicroQ::Statistics::Default.instance.class.should == MicroQ::Statistics::Default
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'should memoize the instance' do
|
23
|
+
2.times.collect { MicroQ::Statistics::Default.instance }.uniq.length.should == 1
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
describe '#increment' do
|
28
|
+
it 'should be a hash' do
|
29
|
+
subject.increment.should == {}
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
describe '#incr' do
|
34
|
+
before do
|
35
|
+
subject.incr('key_name')
|
36
|
+
subject.incr(:other)
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'should add/increment the key' do
|
40
|
+
subject.increment.should == {
|
41
|
+
'key_name' => 1,
|
42
|
+
'other' => 1
|
43
|
+
}
|
44
|
+
end
|
45
|
+
|
46
|
+
describe 'when called again' do
|
47
|
+
before do
|
48
|
+
3.times { subject.incr('other') }
|
49
|
+
end
|
50
|
+
|
51
|
+
it 'should increment the key' do
|
52
|
+
subject.increment.should == {
|
53
|
+
'key_name' => 1,
|
54
|
+
'other' => 4
|
55
|
+
}
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
describe 'when given many keys' do
|
60
|
+
before do
|
61
|
+
2.times { subject.incr('other', 'a-new-key') }
|
62
|
+
end
|
63
|
+
|
64
|
+
it 'should incr each key' do
|
65
|
+
subject.increment.should == {
|
66
|
+
'key_name' => 1,
|
67
|
+
'other' => 3,
|
68
|
+
'a-new-key' => 2
|
69
|
+
}
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe MicroQ::Statistics::Redis do
|
4
|
+
describe '.stats' do
|
5
|
+
it 'should yield a default statistics obj' do
|
6
|
+
MicroQ::Statistics::Redis.stats {|stats| stats.class.should == MicroQ::Statistics::Redis }
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'should memoize the instance' do
|
10
|
+
items = []
|
11
|
+
2.times { MicroQ::Statistics::Redis.stats {|stats| items << stats.object_id } }
|
12
|
+
|
13
|
+
items.uniq.length.should == 1
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
describe '.instance' do
|
18
|
+
it 'should be the statistics obj' do
|
19
|
+
MicroQ::Statistics::Redis.instance.class.should == MicroQ::Statistics::Redis
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'should memoize the instance' do
|
23
|
+
2.times.collect { MicroQ::Statistics::Redis.instance }.uniq.length.should == 1
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
describe '#increment' do
|
28
|
+
it 'should be a hash' do
|
29
|
+
subject.increment.should == {}
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
describe '#incr' do
|
34
|
+
before do
|
35
|
+
subject.incr('key_name')
|
36
|
+
subject.incr(:other)
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'should add/increment the key' do
|
40
|
+
subject.increment.should == {
|
41
|
+
'key_name' => 1,
|
42
|
+
'other' => 1
|
43
|
+
}
|
44
|
+
end
|
45
|
+
|
46
|
+
describe 'when called again' do
|
47
|
+
before do
|
48
|
+
3.times { subject.incr('other') }
|
49
|
+
end
|
50
|
+
|
51
|
+
it 'should increment the key' do
|
52
|
+
subject.increment.should == {
|
53
|
+
'key_name' => 1,
|
54
|
+
'other' => 4
|
55
|
+
}
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
describe 'when given may keys' do
|
60
|
+
before do
|
61
|
+
2.times { subject.incr('other', 'another-key') }
|
62
|
+
end
|
63
|
+
|
64
|
+
it 'should increment each key' do
|
65
|
+
subject.increment.should == {
|
66
|
+
'key_name' => 1,
|
67
|
+
'other' => 3,
|
68
|
+
'another-key' => 2,
|
69
|
+
}
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
data/spec/lib/util_spec.rb
CHANGED
@@ -10,7 +10,7 @@ describe MicroQ::Util do
|
|
10
10
|
MicroQ::Util.constantize('MicroQ::Util').should == MicroQ::Util
|
11
11
|
end
|
12
12
|
|
13
|
-
it 'should work for
|
13
|
+
it 'should work for \'root\' complex class names' do
|
14
14
|
MicroQ::Util.constantize('::MicroQ::Util').should == MicroQ::Util
|
15
15
|
end
|
16
16
|
|
@@ -4,11 +4,14 @@ describe MicroQ::Worker::Standard do
|
|
4
4
|
let(:worker) { {'class' => 'MyWorker', 'args' => [1, 'value']} }
|
5
5
|
let(:other_worker) { {'class' => 'MyWorker', 'method' => 'process', 'args' => [2, 'other-value']} }
|
6
6
|
|
7
|
+
let(:manager) { mock(MicroQ::Manager::Default, :work_done! => nil) }
|
8
|
+
subject { MicroQ::Worker::Standard.new(manager) }
|
9
|
+
|
7
10
|
class MyWorker
|
8
|
-
def self.seed(*
|
9
|
-
def ar_perform(*
|
10
|
-
def perform(*
|
11
|
-
def process(*
|
11
|
+
def self.seed(*) end
|
12
|
+
def ar_perform(*) end
|
13
|
+
def perform(*) end
|
14
|
+
def process(*) end
|
12
15
|
end
|
13
16
|
|
14
17
|
describe '#perform' do
|
@@ -16,9 +19,11 @@ describe MicroQ::Worker::Standard do
|
|
16
19
|
subject.perform(item)
|
17
20
|
end
|
18
21
|
|
19
|
-
it 'should call the
|
20
|
-
perform
|
21
|
-
|
22
|
+
it 'should call the methods' do
|
23
|
+
MyWorker.any_instance.should_receive(:perform).with(1, 'value')
|
24
|
+
MyWorker.any_instance.should_receive(:process).with(2, 'other-value')
|
25
|
+
|
26
|
+
perform(worker); perform(other_worker)
|
22
27
|
end
|
23
28
|
|
24
29
|
it 'should process the middleware chain' do
|
@@ -43,6 +48,12 @@ describe MicroQ::Worker::Standard do
|
|
43
48
|
perform(other_worker)
|
44
49
|
end
|
45
50
|
|
51
|
+
it 'should inform the manager that it finished' do
|
52
|
+
manager.should_receive(:work_done!).with(subject)
|
53
|
+
|
54
|
+
perform(worker)
|
55
|
+
end
|
56
|
+
|
46
57
|
describe 'when using the class loader' do
|
47
58
|
let(:class_worker) { {'class' => 'MyWorker', 'method' => 'seed', 'args' => [3, 45], 'loader' => {}} }
|
48
59
|
|
@@ -53,7 +64,9 @@ describe MicroQ::Worker::Standard do
|
|
53
64
|
end
|
54
65
|
|
55
66
|
it 'should call the method' do
|
56
|
-
|
67
|
+
MyWorker.should_receive(:seed)
|
68
|
+
|
69
|
+
perform(class_worker)
|
57
70
|
end
|
58
71
|
end
|
59
72
|
|
@@ -61,7 +74,7 @@ describe MicroQ::Worker::Standard do
|
|
61
74
|
let(:ar_worker) { {'class' => 'MyWorker', 'method' => 'ar_perform', 'args' => [1, 2], 'loader' => {'method' => 'find', 'args' => [456]}} }
|
62
75
|
|
63
76
|
before do
|
64
|
-
@model = mock(
|
77
|
+
@model = mock('Model', :ar_perform => nil)
|
65
78
|
MyWorker.stub(:find).with(456).and_return(@model)
|
66
79
|
end
|
67
80
|
|
@@ -78,10 +91,12 @@ describe MicroQ::Worker::Standard do
|
|
78
91
|
end
|
79
92
|
|
80
93
|
it 'should call the method b' do
|
81
|
-
worker = MyWorker
|
94
|
+
worker = mock(MyWorker)
|
82
95
|
MyWorker.stub(:find).with(456).and_return(worker)
|
83
96
|
|
84
|
-
|
97
|
+
worker.should_receive(:ar_perform).with(1, 2)
|
98
|
+
|
99
|
+
perform(ar_worker)
|
85
100
|
end
|
86
101
|
end
|
87
102
|
end
|
@@ -7,7 +7,7 @@ describe MicroQ::Wrapper::ActionMailer do
|
|
7
7
|
end
|
8
8
|
|
9
9
|
describe '#perform' do
|
10
|
-
let(:mail) { mock(
|
10
|
+
let(:mail) { mock('email', :deliver => nil) }
|
11
11
|
|
12
12
|
def perform
|
13
13
|
subject.perform('MyMailer', 'mail_me', 1, 2)
|
@@ -36,7 +36,7 @@ describe MicroQ::Wrapper::ActionMailer do
|
|
36
36
|
end
|
37
37
|
|
38
38
|
describe 'when the email does not work' do
|
39
|
-
let(:mail) { mock(
|
39
|
+
let(:mail) { mock('email without deliver') }
|
40
40
|
|
41
41
|
before do
|
42
42
|
mail.stub(:respond_to?).with(:deliver).and_return(false)
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,190 +1,167 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: micro_q
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.8.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Brian Norton
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-03-15 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: celluloid
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
19
|
+
version: 0.12.0
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
26
|
+
version: 0.12.0
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: redis
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: connection_pool
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - '>='
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: rake
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - '>='
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '0'
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - '>='
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: '0'
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: rspec
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- -
|
73
|
+
- - '>='
|
84
74
|
- !ruby/object:Gem::Version
|
85
75
|
version: '0'
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
|
-
- -
|
80
|
+
- - '>='
|
92
81
|
- !ruby/object:Gem::Version
|
93
82
|
version: '0'
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: timecop
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
|
-
- -
|
87
|
+
- - '>='
|
100
88
|
- !ruby/object:Gem::Version
|
101
89
|
version: '0'
|
102
90
|
type: :development
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
|
-
- -
|
94
|
+
- - '>='
|
108
95
|
- !ruby/object:Gem::Version
|
109
96
|
version: '0'
|
110
97
|
- !ruby/object:Gem::Dependency
|
111
98
|
name: psych
|
112
99
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
100
|
requirements:
|
115
|
-
- -
|
101
|
+
- - '>='
|
116
102
|
- !ruby/object:Gem::Version
|
117
103
|
version: '0'
|
118
104
|
type: :development
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
107
|
requirements:
|
123
|
-
- -
|
108
|
+
- - '>='
|
124
109
|
- !ruby/object:Gem::Version
|
125
110
|
version: '0'
|
126
111
|
- !ruby/object:Gem::Dependency
|
127
112
|
name: activerecord
|
128
113
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
114
|
requirements:
|
131
|
-
- -
|
115
|
+
- - '>'
|
132
116
|
- !ruby/object:Gem::Version
|
133
117
|
version: 3.2.0
|
134
118
|
type: :development
|
135
119
|
prerelease: false
|
136
120
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
121
|
requirements:
|
139
|
-
- -
|
122
|
+
- - '>'
|
140
123
|
- !ruby/object:Gem::Version
|
141
124
|
version: 3.2.0
|
142
125
|
- !ruby/object:Gem::Dependency
|
143
126
|
name: actionmailer
|
144
127
|
requirement: !ruby/object:Gem::Requirement
|
145
|
-
none: false
|
146
128
|
requirements:
|
147
|
-
- -
|
129
|
+
- - '>'
|
148
130
|
- !ruby/object:Gem::Version
|
149
131
|
version: 3.2.0
|
150
132
|
type: :development
|
151
133
|
prerelease: false
|
152
134
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
-
none: false
|
154
135
|
requirements:
|
155
|
-
- -
|
136
|
+
- - '>'
|
156
137
|
- !ruby/object:Gem::Version
|
157
138
|
version: 3.2.0
|
158
139
|
- !ruby/object:Gem::Dependency
|
159
140
|
name: sqlite3-ruby
|
160
141
|
requirement: !ruby/object:Gem::Requirement
|
161
|
-
none: false
|
162
142
|
requirements:
|
163
|
-
- -
|
143
|
+
- - '>='
|
164
144
|
- !ruby/object:Gem::Version
|
165
145
|
version: '0'
|
166
146
|
type: :development
|
167
147
|
prerelease: false
|
168
148
|
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
none: false
|
170
149
|
requirements:
|
171
|
-
- -
|
150
|
+
- - '>='
|
172
151
|
- !ruby/object:Gem::Version
|
173
152
|
version: '0'
|
174
153
|
- !ruby/object:Gem::Dependency
|
175
154
|
name: mock_redis
|
176
155
|
requirement: !ruby/object:Gem::Requirement
|
177
|
-
none: false
|
178
156
|
requirements:
|
179
|
-
- -
|
157
|
+
- - '>='
|
180
158
|
- !ruby/object:Gem::Version
|
181
159
|
version: '0'
|
182
160
|
type: :development
|
183
161
|
prerelease: false
|
184
162
|
version_requirements: !ruby/object:Gem::Requirement
|
185
|
-
none: false
|
186
163
|
requirements:
|
187
|
-
- -
|
164
|
+
- - '>='
|
188
165
|
- !ruby/object:Gem::Version
|
189
166
|
version: '0'
|
190
167
|
description: ''
|
@@ -195,6 +172,7 @@ extra_rdoc_files: []
|
|
195
172
|
files:
|
196
173
|
- .gitignore
|
197
174
|
- .rspec
|
175
|
+
- .ruby-version
|
198
176
|
- .travis.yml
|
199
177
|
- Gemfile
|
200
178
|
- LICENSE
|
@@ -205,15 +183,18 @@ files:
|
|
205
183
|
- lib/micro_q/dsl.rb
|
206
184
|
- lib/micro_q/manager.rb
|
207
185
|
- lib/micro_q/manager/default.rb
|
208
|
-
- lib/micro_q/methods.rb
|
209
186
|
- lib/micro_q/methods/action_mailer.rb
|
210
187
|
- lib/micro_q/methods/active_record.rb
|
211
188
|
- lib/micro_q/methods/class.rb
|
212
189
|
- lib/micro_q/methods/instance.rb
|
213
190
|
- lib/micro_q/middleware.rb
|
214
191
|
- lib/micro_q/middleware/chain.rb
|
192
|
+
- lib/micro_q/middleware/client/statistics.rb
|
215
193
|
- lib/micro_q/middleware/server/connection.rb
|
216
194
|
- lib/micro_q/middleware/server/retry.rb
|
195
|
+
- lib/micro_q/middleware/server/statistics.rb
|
196
|
+
- lib/micro_q/middleware/server/timeout.rb
|
197
|
+
- lib/micro_q/middleware/util.rb
|
217
198
|
- lib/micro_q/proxies.rb
|
218
199
|
- lib/micro_q/proxies/action_mailer.rb
|
219
200
|
- lib/micro_q/proxies/base.rb
|
@@ -223,11 +204,13 @@ files:
|
|
223
204
|
- lib/micro_q/queue/default.rb
|
224
205
|
- lib/micro_q/queue/redis.rb
|
225
206
|
- lib/micro_q/redis.rb
|
207
|
+
- lib/micro_q/statistics/base.rb
|
208
|
+
- lib/micro_q/statistics/default.rb
|
209
|
+
- lib/micro_q/statistics/redis.rb
|
226
210
|
- lib/micro_q/util.rb
|
227
211
|
- lib/micro_q/version.rb
|
228
212
|
- lib/micro_q/worker.rb
|
229
213
|
- lib/micro_q/worker/standard.rb
|
230
|
-
- lib/micro_q/wrappers.rb
|
231
214
|
- lib/micro_q/wrappers/action_mailer.rb
|
232
215
|
- micro_q.gemspec
|
233
216
|
- spec/helpers/methods_examples.rb
|
@@ -241,41 +224,45 @@ files:
|
|
241
224
|
- spec/lib/methods/instance_spec.rb
|
242
225
|
- spec/lib/micro_q_spec.rb
|
243
226
|
- spec/lib/middleware/chain_spec.rb
|
227
|
+
- spec/lib/middleware/client/statistics_spec.rb
|
244
228
|
- spec/lib/middleware/server/connection_spec.rb
|
245
229
|
- spec/lib/middleware/server/retry_spec.rb
|
230
|
+
- spec/lib/middleware/server/statistics_spec.rb
|
231
|
+
- spec/lib/middleware/server/timeout_spec.rb
|
246
232
|
- spec/lib/proxies/action_mailer_spec.rb
|
247
233
|
- spec/lib/proxies/base_spec.rb
|
248
234
|
- spec/lib/proxies/class_spec.rb
|
249
235
|
- spec/lib/proxies/instance_spec.rb
|
250
236
|
- spec/lib/queue/default_spec.rb
|
251
237
|
- spec/lib/queue/redis_spec.rb
|
238
|
+
- spec/lib/statistics/default_spec.rb
|
239
|
+
- spec/lib/statistics/redis_spec.rb
|
252
240
|
- spec/lib/util_spec.rb
|
253
241
|
- spec/lib/worker/standard_spec.rb
|
254
242
|
- spec/lib/wrappers/action_mailer_spec.rb
|
255
243
|
- spec/spec_helper.rb
|
256
244
|
homepage: http://github.com/bnorton/micro-q
|
257
245
|
licenses: []
|
246
|
+
metadata: {}
|
258
247
|
post_install_message:
|
259
248
|
rdoc_options: []
|
260
249
|
require_paths:
|
261
250
|
- lib
|
262
251
|
required_ruby_version: !ruby/object:Gem::Requirement
|
263
|
-
none: false
|
264
252
|
requirements:
|
265
|
-
- -
|
253
|
+
- - '>='
|
266
254
|
- !ruby/object:Gem::Version
|
267
255
|
version: '0'
|
268
256
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
269
|
-
none: false
|
270
257
|
requirements:
|
271
|
-
- -
|
258
|
+
- - '>='
|
272
259
|
- !ruby/object:Gem::Version
|
273
260
|
version: '0'
|
274
261
|
requirements: []
|
275
262
|
rubyforge_project:
|
276
|
-
rubygems_version:
|
263
|
+
rubygems_version: 2.0.3
|
277
264
|
signing_key:
|
278
|
-
specification_version:
|
265
|
+
specification_version: 4
|
279
266
|
summary: ''
|
280
267
|
test_files:
|
281
268
|
- spec/helpers/methods_examples.rb
|
@@ -289,16 +276,20 @@ test_files:
|
|
289
276
|
- spec/lib/methods/instance_spec.rb
|
290
277
|
- spec/lib/micro_q_spec.rb
|
291
278
|
- spec/lib/middleware/chain_spec.rb
|
279
|
+
- spec/lib/middleware/client/statistics_spec.rb
|
292
280
|
- spec/lib/middleware/server/connection_spec.rb
|
293
281
|
- spec/lib/middleware/server/retry_spec.rb
|
282
|
+
- spec/lib/middleware/server/statistics_spec.rb
|
283
|
+
- spec/lib/middleware/server/timeout_spec.rb
|
294
284
|
- spec/lib/proxies/action_mailer_spec.rb
|
295
285
|
- spec/lib/proxies/base_spec.rb
|
296
286
|
- spec/lib/proxies/class_spec.rb
|
297
287
|
- spec/lib/proxies/instance_spec.rb
|
298
288
|
- spec/lib/queue/default_spec.rb
|
299
289
|
- spec/lib/queue/redis_spec.rb
|
290
|
+
- spec/lib/statistics/default_spec.rb
|
291
|
+
- spec/lib/statistics/redis_spec.rb
|
300
292
|
- spec/lib/util_spec.rb
|
301
293
|
- spec/lib/worker/standard_spec.rb
|
302
294
|
- spec/lib/wrappers/action_mailer_spec.rb
|
303
295
|
- spec/spec_helper.rb
|
304
|
-
has_rdoc:
|
data/lib/micro_q/methods.rb
DELETED
data/lib/micro_q/wrappers.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require 'micro_q/wrappers/action_mailer'
|