Sha256: 356396784064baa18717417c6cae8cfabea2cf7c0f34a141dd66a72f409ba3ba
Contents?: true
Size: 894 Bytes
Versions: 3
Compression:
Stored size: 894 Bytes
Contents
require 'socket' require 'sidekiq/exception_handler' module Sidekiq ## # This module is part of Sidekiq core and not intended for extensions. # module Util include ExceptionHandler EXPIRY = 60 * 60 * 24 def constantize(camel_cased_word) names = camel_cased_word.split('::') names.shift if names.empty? || names.first.empty? constant = Object names.each do |name| constant = constant.const_defined?(name) ? constant.const_get(name) : constant.const_missing(name) end constant end def watchdog(last_words) yield rescue Exception => ex handle_exception(ex, { :context => last_words }) end def logger Sidekiq.logger end def redis(&block) Sidekiq.redis(&block) end def process_id Process.pid end def hostname Socket.gethostname end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
sidekiq-2.4.0 | lib/sidekiq/util.rb |
sidekiq-2.3.3 | lib/sidekiq/util.rb |
sidekiq-2.3.2 | lib/sidekiq/util.rb |