Class: Chimp::ChimpDaemon::AdminServlet

Inherits:
GenericServlet
  • Object
show all
Defined in:
lib/right_chimp/daemon/chimp_daemon.rb

Overview

AdminServlet - admin functions

Instance Method Summary collapse

Methods inherited from GenericServlet

#get_id, #get_job_uuid, #get_payload, #get_verb

Instance Method Details

#do_POST(req, resp) ⇒ Object

get do_POST

Raises:

  • (WEBrick::HTTPStatus::OK)


316
317
318
319
320
321
322
323
324
325
# File 'lib/right_chimp/daemon/chimp_daemon.rb', line 316

def do_POST(req, resp)
  payload = self.get_payload(req)
  shutdown = payload['shutdown'] || false

  if shutdown == true
  	ChimpDaemon.instance.quit
  end

  raise WEBrick::HTTPStatus::OK
end