module Scheduler
Based off sidetiq github.com/tobiassvn/sidetiq/blob/master/lib/sidetiq/web.rb
Constants
- VERSION
Attributes
configuration[W]
Public Class Methods
configuration()
click to toggle source
# File lib/scheduler.rb, line 9 def self.configuration @configuration ||= Configuration.new end
configure() { |configuration| ... }
click to toggle source
# File lib/scheduler.rb, line 13 def self.configure yield(configuration) end
handle_job_exception(ex, context = {}, parent_logger = nil)
click to toggle source
Log an exception.
If your code is in a scheduled job, it is recommended to use the error_context() method in Jobs::Base to pass the job arguments and any other desired context. See app/jobs/base.rb for the error_context function.
# File lib/scheduler.rb, line 28 def self.handle_job_exception(ex, context = {}, parent_logger = nil) context ||= {} parent_logger ||= SidekiqExceptionHandler parent_logger.handle_exception(ex, { current_db: Scheduler::Connection.current_db, current_hostname: Scheduler::Connection.current_hostname }.merge(context)) end