farmstead 0.0.61 → 0.0.62
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/farmstead/pipeline/extract.rb +3 -3
- data/lib/farmstead/pipeline/manage.rb +3 -3
- data/lib/farmstead/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bfd23b610c05e88e9b75115d4895cd02481b479
|
4
|
+
data.tar.gz: f6f890f173573f3a6183986bc92d73ed22d7ba1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a1d4b673abe3bff43af27a8ce929272868a69ceedd67d4c91fec5c53e3003b6a08fa3742e174523ce24b99bfd4c88a62d98c199bcf2660d26a049c72a9d5d5b
|
7
|
+
data.tar.gz: 329539a361733799925c103c2199bf1daab777ddbc98cb342a16d6b023a9b9f1cf6170a0ed9adbf80295f4c8201915de103da9fe1ee884e74a7cbd74b8b22399
|
data/Gemfile.lock
CHANGED
@@ -15,9 +15,9 @@ module Farmstead
|
|
15
15
|
trap('TERM') { @consumer.stop }
|
16
16
|
@consumer.each_message do |message|
|
17
17
|
puts "Received: #{message.value}"
|
18
|
-
#
|
19
|
-
|
20
|
-
my_module = Object.const_get "<%= ENV['name'].capitalize %>::#{
|
18
|
+
# The Field message only contains the module name
|
19
|
+
module_name = JSON.parse(message.value)
|
20
|
+
my_module = Object.const_get "<%= ENV['name'].capitalize %>::#{module_name}"
|
21
21
|
result = my_module::extract
|
22
22
|
Farmstead::DB.insert("test",result: result)
|
23
23
|
@producer.produce(result, topic: "Forest")
|
@@ -27,9 +27,9 @@ module Farmstead
|
|
27
27
|
# Cycle thru sources, pull config and pass to Kafka
|
28
28
|
sources = Farmstead::DB.select_all("sources")
|
29
29
|
sources.each do |source|
|
30
|
-
|
31
|
-
puts
|
32
|
-
@producer.produce(
|
30
|
+
module_name = source["module"]
|
31
|
+
puts module_name
|
32
|
+
@producer.produce(module_name, topic: "Field")
|
33
33
|
@producer.deliver_messages
|
34
34
|
end
|
35
35
|
end
|
data/lib/farmstead/version.rb
CHANGED