Module: Bp3::Noticed::QueIncludes
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/bp3/noticed/que_includes.rb
Instance Method Summary collapse
- #job_type ⇒ Object private
-
#log_level(elapsed) ⇒ Object
set the log level based on the job duration.
- #run_attrs(key) ⇒ Object private
Instance Method Details
#job_type ⇒ Object (private)
52 53 54 |
# File 'lib/bp3/noticed/que_includes.rb', line 52 def job_type 'que' end |
#log_level(elapsed) ⇒ Object
set the log level based on the job duration. elapsed is in seconds
40 41 42 43 44 45 46 47 48 |
# File 'lib/bp3/noticed/que_includes.rb', line 40 def log_level(elapsed) if elapsed > 5 :warn elsif elapsed > 1 :info else false # no need to log end end |
#run_attrs(key) ⇒ Object (private)
56 57 58 59 60 61 62 |
# File 'lib/bp3/noticed/que_includes.rb', line 56 def run_attrs(key) check(que_attrs, key) || check(que_attrs[:args], key) || check(que_attrs[:kwargs], key) || check(args, key) || check(kwargs, key) end |