Sha256: 9a4d5697370c0ad68cd5b32d0c75bef93e91317b2da9e9043b8244dba0a9edb9
Contents?: true
Size: 878 Bytes
Versions: 3
Compression:
Stored size: 878 Bytes
Contents
require 'creeper/exception_handler' module Creeper ## # This module is part of Creeper core and not intended for extensions. # module Util include ExceptionHandler EXPIRY = 60 * 60 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 => ex handle_exception(ex, { :context => last_words }) end def logger Creeper.logger end def beanstalk(&block) Creeper.beanstalk(&block) end def redis(&block) Creeper.redis(&block) end def process_id Process.pid end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
creeper-2.0.2 | lib/creeper/util.rb |
creeper-2.0.1 | lib/creeper/util.rb |
creeper-2.0.0 | lib/creeper/util.rb |