railway-ipc 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/railway_ipc.rb +5 -0
- data/lib/railway_ipc/tasks/start_consumers.rake +6 -0
- data/lib/railway_ipc/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ade6188ad53835d058964953332583db7cf146f2b02b58c4a25cddb42e7f89cf
|
4
|
+
data.tar.gz: 4672c6b08a293c1988f42c944063cc9ba67d6656531b8c3a3fd9b00ab908219e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a76acd180339079bc95bd042e6a6c2512edd05d485ca2763e8211278f85adf0677156f1e8d305ce5cc4186c9304ed85e7c8343b0a32b79560225e1261e7801a9
|
7
|
+
data.tar.gz: ceab6497161f8c640cbb2da715b9380729b1e8dbb40843d11fd879a32214e7f39f5aa130d811eeff66c0f0b59eea743e6cb97aa8fb89bcb2fa62aa06ceffb65f
|
data/CHANGELOG.md
CHANGED
@@ -10,6 +10,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
10
10
|
### Removed
|
11
11
|
### Fixed
|
12
12
|
|
13
|
+
## [2.2.0] - 2020-10-20
|
14
|
+
### Added
|
15
|
+
* The ability to configure workers to handle different workloads via `rake railway_ipc::consumers:spawn`
|
16
|
+
|
17
|
+
## [2.1.0] - 2020-10-19
|
18
|
+
### Added
|
19
|
+
* :options parameter to `listen_to` which passes keys along to Sneaker's `from_queue` method.
|
20
|
+
|
13
21
|
## [2.0.3] - 2020-09-02
|
14
22
|
### Fixed
|
15
23
|
* Fix RPC server. RPC servers need to conform to the Sneaker worker API (i.e. their initializers need to be able to accept queue name / pool and they require a `stop` method.
|
data/lib/railway_ipc.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'railway_ipc/version'
|
4
4
|
require 'sneakers'
|
5
|
+
require 'sneakers/spawner'
|
5
6
|
require 'bunny'
|
6
7
|
require 'active_record'
|
7
8
|
require 'railway_ipc/version'
|
@@ -29,6 +30,10 @@ module RailwayIpc
|
|
29
30
|
Rake::Task['sneakers:run'].invoke
|
30
31
|
end
|
31
32
|
|
33
|
+
def self.spawn
|
34
|
+
Sneakers::Spawner.spawn
|
35
|
+
end
|
36
|
+
|
32
37
|
def self.configure(log_device=STDOUT, level=::Logger::INFO, log_formatter=nil)
|
33
38
|
@logger = RailwayIpc::Logger.new(log_device, level, log_formatter)
|
34
39
|
end
|
@@ -2,9 +2,15 @@
|
|
2
2
|
|
3
3
|
namespace :railway_ipc do
|
4
4
|
namespace :consumers do
|
5
|
+
desc 'Start consumers via explicitly defining them'
|
5
6
|
task :start do
|
6
7
|
ENV['WORKERS'] = ENV['CONSUMERS']
|
7
8
|
RailwayIpc.start
|
8
9
|
end
|
10
|
+
|
11
|
+
desc 'Start consumers via ./config/sneaker_worker_groups.yml'
|
12
|
+
task :spawn do
|
13
|
+
RailwayIpc.spawn
|
14
|
+
end
|
9
15
|
end
|
10
16
|
end
|
data/lib/railway_ipc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: railway-ipc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-10-
|
11
|
+
date: 2020-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|