Skip to content

Commit

Permalink
Remove unused argument
Browse files Browse the repository at this point in the history
Signed-off-by: Yuta Iwama <ganmacs@gmail.com>
  • Loading branch information
ganmacs committed May 29, 2019
1 parent 5afc53b commit e7d90df
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions lib/fluent/plugin/in_monitor_agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def initialize(server, agent)

def do_GET(req, res)
begin
code, header, body = process(req, res)
code, header, body = process(req)
rescue
code, header, body = render_json_error(500, {
'message '=> 'Internal Server Error',
Expand All @@ -67,7 +67,7 @@ def do_GET(req, res)
res.body = body
end

def build_object(req, res)
def build_object(req)
unless req.path_info == ""
return render_json_error(404, "Not found")
end
Expand Down Expand Up @@ -147,8 +147,8 @@ def render_json_error(code, obj, opts={})
end

class LTSVMonitorServlet < MonitorServlet
def process(req, res)
list, _opts = build_object(req, res)
def process(req)
list, _opts = build_object(req)
return unless list

normalized = JSON.parse(list.to_json)
Expand All @@ -170,8 +170,8 @@ def process(req, res)
end

class JSONMonitorServlet < MonitorServlet
def process(req, res)
list, opts = build_object(req, res)
def process(req)
list, opts = build_object(req)
return unless list

render_json({
Expand All @@ -181,7 +181,7 @@ def process(req, res)
end

class ConfigMonitorServlet < MonitorServlet
def build_object(req, res)
def build_object(req)
{
'pid' => Process.pid,
'ppid' => Process.ppid
Expand All @@ -190,8 +190,8 @@ def build_object(req, res)
end

class LTSVConfigMonitorServlet < ConfigMonitorServlet
def process(req, res)
result = build_object(req, res)
def process(req)
result = build_object(req)

row = []
JSON.parse(result.to_json).each_pair { |k, v|
Expand All @@ -204,8 +204,8 @@ def process(req, res)
end

class JSONConfigMonitorServlet < ConfigMonitorServlet
def process(req, res)
result = build_object(req, res)
def process(req)
result = build_object(req)
render_json(result)
end
end
Expand Down

0 comments on commit e7d90df

Please sign in to comment.