Module: Jfrog::Saas::Log::Collector

Defined in:
lib/jfrog/saas/log/collector.rb,
lib/jfrog/saas/log/collector/version.rb

Constant Summary collapse

VERSION =
'0.1.5'

Class Method Summary collapse

Class Method Details

.shutdownObject



228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/jfrog/saas/log/collector.rb', line 228

def self.shutdown
  MessageUtils.instance.put_message(MessageUtils::SHUT_DOWN_PROCESS, { "param1": Process.pid.to_s,
                                                                       "#{MessageUtils::LOG_LEVEL}": CommonUtils::LOG_ERROR,
                                                                       "#{MessageUtils::SOLUTION}": MessageUtils::SOLUTION_OVERRIDE_TERMINATE })
  sleep 1
  Thread.list.each do |thread|
    MessageUtils.instance.put_message(MessageUtils::TERMINATING_THREAD, { "param1": thread.object_id.to_s,
                                                                          "#{MessageUtils::LOG_LEVEL}": CommonUtils::LOG_ERROR,
                                                                          "#{MessageUtils::SOLUTION}": MessageUtils::SOLUTION_OVERRIDE_TERMINATE })
    Thread.kill thread
  end
  exit 130
end