fluent-plugin-festival 0.0.5 → 0.0.6
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/fluent-plugin-festival.gemspec +1 -1
- data/lib/fluent/plugin/festival_proxy.rb +1 -1
- data/lib/fluent/plugin/in_festival.rb +7 -14
- 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: 328283ff85d814d57b5e9c06aac86f4d5c3faf7c
|
4
|
+
data.tar.gz: 20c812a04801f2ebe7940992151824119374b81b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bce12f937c6e8f2bd01d4dfdbfa5b3a005d4a97c2a03bc8a77237eff0745e4462991990946a0302ecdb608ab03a55f523d059350e79ed35c7da9bb06b608ca84
|
7
|
+
data.tar.gz: 225ea212bee5b941eb75cd12c86fd5d7f2133af54be5247c3db8320eb555c29a967a283b2ea3af4e7cc40dc6008bef557507d7b0b22deb4ac5b9ac3f46ea5848
|
@@ -26,7 +26,7 @@ module Fluent::Plugin
|
|
26
26
|
|
27
27
|
def error_handler(response, message)
|
28
28
|
if response.code != "200"
|
29
|
-
log.error :
|
29
|
+
log.error error: message
|
30
30
|
log.debug "code: #{response.code}"
|
31
31
|
log.debug "message: #{response.message}"
|
32
32
|
log.debug "body: #{response.body}"
|
@@ -9,10 +9,10 @@ module Fluent::Plugin
|
|
9
9
|
|
10
10
|
Fluent::Plugin.register_input('festival', self)
|
11
11
|
|
12
|
-
helpers :
|
12
|
+
helpers :timer
|
13
13
|
|
14
14
|
desc 'FESTIVAL EaaS API URI'
|
15
|
-
config_param :api_uri, :string, :
|
15
|
+
config_param :api_uri, :string, default: 'https://api.festival-project.eu'
|
16
16
|
desc 'email (login_name) for FESTIVAL EaaS API'
|
17
17
|
config_param :email, :string
|
18
18
|
desc 'password for FESTIVAL EaaS API'
|
@@ -25,7 +25,7 @@ module Fluent::Plugin
|
|
25
25
|
desc 'The tag of the event.'
|
26
26
|
config_param :tag, :string
|
27
27
|
desc 'Polling interval to get message from FESTIVAL EaaS API'
|
28
|
-
config_param :polling_interval, :integer, :
|
28
|
+
config_param :polling_interval, :integer, default: 60
|
29
29
|
|
30
30
|
# <resoruce> tag can be used for specifying multiple resources in a <source> tag
|
31
31
|
# If the user wants to specify different format or polling interval for each resource,
|
@@ -67,20 +67,14 @@ module Fluent::Plugin
|
|
67
67
|
#raise StandardError.new if @tag.nil?
|
68
68
|
super
|
69
69
|
start_proxy
|
70
|
-
|
71
|
-
end
|
72
|
-
|
73
|
-
def get_loop
|
74
|
-
while (true)
|
70
|
+
timer_execute(:in_festival, @polling_interval) do
|
75
71
|
begin
|
76
72
|
data = get_data
|
77
73
|
emit(data) if !(data.nil? || data.empty?)
|
78
|
-
sleep @polling_interval
|
79
74
|
rescue Exception => e
|
80
|
-
log.error :
|
75
|
+
log.error error: e.to_s
|
81
76
|
log.debug(e.backtrace.join("\n"))
|
82
|
-
|
83
|
-
sleep @polling_interval
|
77
|
+
log.trace_backtrace(e.backtrace)
|
84
78
|
end
|
85
79
|
end
|
86
80
|
end
|
@@ -103,13 +97,12 @@ module Fluent::Plugin
|
|
103
97
|
router.emit(@tag, time, record)
|
104
98
|
end
|
105
99
|
rescue Exception => e
|
106
|
-
log.error :
|
100
|
+
log.error error: e.to_s
|
107
101
|
log.debug_backtrace(e.backtrace)
|
108
102
|
end
|
109
103
|
end
|
110
104
|
|
111
105
|
def shutdown
|
112
|
-
@proxy_thread.kill
|
113
106
|
shutdown_proxy
|
114
107
|
super
|
115
108
|
end
|