class Upman::Worker::ReportInstallHistory
Public Instance Methods
register()
click to toggle source
# File lib/upman/worker/report_install_history.rb, line 5 def register return self end
run!()
click to toggle source
# File lib/upman/worker/report_install_history.rb, line 9 def run! while true install_history_service = ::Upman::Service::InstallHistory.new data = install_history_service.get("") info "Report install history to API" node_service = Upman::Service::Node.new node_uuid = node_service.get_node_uuuid api = ::Upman::Utils::Api.new api.post("upman/node/install_history?uuid=#{node_uuid}", "{\"data\": #{data.to_json}}") sleep(::Upman::Core::Config.daemon[:interval]) end end