Skip to content

Instantly share code, notes, and snippets.

@rottenbytes
Forked from phrawzty/agentreload.rb
Created March 28, 2011 17:15
Show Gist options
  • Save rottenbytes/890862 to your computer and use it in GitHub Desktop.
Save rottenbytes/890862 to your computer and use it in GitHub Desktop.
module MCollective
module Agent
class agentreload<RPC::Agent
action 'reload' do
validate :name, String
reply.fail! "#{request[:name]} not found." unless Agents.agentlist.include?(request[:name])
# we should iterate on @config.libdir here...
load(@config.libdir[0]+"/mcollective/agent/"+request[:name]+".rb")
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment