Skip to content

Commit

Permalink
Revert ptrc_resque command
Browse files Browse the repository at this point in the history
  • Loading branch information
shunwen committed Jan 10, 2014
1 parent c3af3a8 commit c2d5b6f
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions resque.coffee
Expand Up @@ -20,22 +20,6 @@ module.exports = (robot) ->
.get() (err, res, body) -> .get() (err, res, body) ->
msg.send format_stats parse_stats body msg.send format_stats parse_stats body


module.exports = (robot) ->
robot.respond /ptrc_resque/i, (msg) ->
msg.send 'got ptrc'
msg.http('http://172.30.42.1:5678/workers/OptimisPTRC')
.get() (err, res, body) ->
html = body
msg.send parse_workers_stats(body).toString()
msg.send html


parse_workers_stats = (stats) ->
parser = new DOMParser()
xmlDoc = parser.parseFromString(stats,"text/xml")
xmlDoc.getElementsByClassName('queue-tag')


parse_stats = (stats) -> parse_stats = (stats) ->
details = {} details = {}
handle_line = (line) -> handle_line = (line) ->
Expand Down

0 comments on commit c2d5b6f

Please sign in to comment.