Class: Patriot::Worker::JobStoreServer
- Defined in:
- lib/patriot/worker/job_store_server.rb
Overview
a worker as info server
Constant Summary
Constants included from Util::Config
Util::Config::ADMIN_USER_KEY, Util::Config::DEFAULT_CONFIG, Util::Config::DEFAULT_PLUGIN_DIR, Util::Config::INFO_SERVER_PORT_KEY, Util::Config::PASSWORD_KEY, Util::Config::PLUGIN_DIR_KEY, Util::Config::PLUGIN_INIT_SCRIPT, Util::Config::PLUGIN_KEY, Util::Config::PLUGIN_LIB_DIR, Util::Config::USERNAME_KEY, Util::Config::WORKER_HOST_KEY, Util::Config::WORKER_USER_KEY
Instance Attribute Summary
Attributes inherited from Base
#config, #cycle, #host, #job_store, #started_at, #status
Instance Method Summary collapse
Methods inherited from Base
#execute_job, #get_pid, #initialize, #request_shutdown, #start_worker
Methods included from JobStore::Factory
Methods included from Util::Retry
Methods included from Util::Logger
Methods included from Util::Config
Constructor Details
This class inherits a constructor from Patriot::Worker::Base
Instance Method Details
#build_infoserver ⇒ Object
10 11 12 |
# File 'lib/patriot/worker/job_store_server.rb', line 10 def build_infoserver return Patriot::Worker::InfoServer.new(self,@config) end |
#init_worker ⇒ Object
15 16 |
# File 'lib/patriot/worker/job_store_server.rb', line 15 def init_worker end |
#run_worker ⇒ Object
19 20 21 22 23 |
# File 'lib/patriot/worker/job_store_server.rb', line 19 def run_worker while(@status != Patriot::Worker::Status::SHUTDOWN) sleep @cycle end end |
#stop_worker ⇒ Object
26 27 28 |
# File 'lib/patriot/worker/job_store_server.rb', line 26 def stop_worker @logger.info "terminated" end |