asynk 0.0.1 → 0.0.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/README.md +24 -2
- data/asynk.gemspec +1 -1
- data/lib/asynk/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c1d786d99aab6d7b6874ebfb8078b27ac9c37a7
|
4
|
+
data.tar.gz: 8da83593b68224d7d12a2a3272145c68aa01e642
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a2f8f4b0ff82bff814383a1c68da700941409bdc08568a91470934fc986fe4a03135ac37197e7ced411dcaa3158a589922e20c02cb505211aef3b0ed90c3192
|
7
|
+
data.tar.gz: c10a84010a90d61fd86f90a06d28ba0a7f2c2cf73023950eea7cb453d29f662f694bbf3136e3833e397fa383b443917db1b3a78dc5a04c85c2c7f827873bb488
|
data/README.md
CHANGED
@@ -125,7 +125,7 @@ end
|
|
125
125
|
|
126
126
|
|
127
127
|
# Testing your consumers
|
128
|
-
Firstly you should include `Asynk::TestHelper` to your test class, and then call
|
128
|
+
Firstly you should include `Asynk::TestHelper` to your test class, and then call `sync_publish` method for sending request, if this is rpc call,
|
129
129
|
invoke the asynk_response method for getting response.
|
130
130
|
|
131
131
|
Example using with Rails and MiniTest.
|
@@ -152,6 +152,28 @@ Example using with Rails and MiniTest.
|
|
152
152
|
assert asynk_response[:unread_message_count]
|
153
153
|
end
|
154
154
|
```
|
155
|
+
## Disabling consumers
|
156
|
+
If you have application that have multiple different consumers, you can disable some of them by setting ignored_consumers parameter.
|
157
|
+
|
158
|
+
For example, if you have application that implement media file processing consumers - TranscodeVideoConsumer, ResizeImageConsumer, CutAudioConsumer and you want one server only to transcode video files.
|
159
|
+
|
160
|
+
You have to set ignored_consumers parameter before connecting to server
|
161
|
+
|
162
|
+
```ruby
|
163
|
+
Asynk.config[:ignored_consumers] = ['ResizeImageConsumer', 'CutAudioConsumer']
|
164
|
+
```
|
165
|
+
|
166
|
+
Also you can set ignored consumers in string environment variable
|
167
|
+
|
168
|
+
```bash
|
169
|
+
export IGNORED_CONSUMERS=ResizeImageConsumer,CutAudioConsumer
|
170
|
+
```
|
171
|
+
|
172
|
+
and then in Asynk initializer
|
173
|
+
|
174
|
+
```ruby
|
175
|
+
Asynk.config[:ignored_consumers] = ENV['IGNORED_CONSUMERS'].delete(' ').split(',') if ENV['IGNORED_CONSUMERS']
|
176
|
+
```
|
155
177
|
|
156
178
|
## Known problems
|
157
179
|
|
@@ -165,4 +187,4 @@ Example using with Rails and MiniTest.
|
|
165
187
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
166
188
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
167
189
|
4. Push to the branch (`git push origin my-new-feature`)
|
168
|
-
5. Create a new Pull Request
|
190
|
+
5. Create a new Pull Request
|
data/asynk.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
|
|
18
18
|
gem.add_dependency 'celluloid', '~> 0.17'
|
19
19
|
gem.add_dependency 'celluloid-io', '~> 0.17'
|
20
20
|
gem.add_dependency 'connection_pool', '~> 2.2'
|
21
|
-
gem.add_dependency 'activesupport', '
|
21
|
+
gem.add_dependency 'activesupport', '>= 4.2'
|
22
22
|
gem.add_dependency 'json', '~> 1.0'
|
23
23
|
gem.add_dependency 'bunny', '~> 2.3'
|
24
24
|
gem.add_development_dependency 'minitest', '~> 5.7', '>= 5.7.0'
|
data/lib/asynk/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asynk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danil Nurgaliev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: celluloid
|
@@ -56,14 +56,14 @@ dependencies:
|
|
56
56
|
name: activesupport
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '4.2'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '4.2'
|
69
69
|
- !ruby/object:Gem::Dependency
|