class Aws::Rails::SqsActiveJob::Poller
def run
def run # exit 0 boot_rails # cannot load config (from file or initializers) until after # rails has been booted. @options = DEFAULT_OPTS .merge(Aws::Rails::SqsActiveJob.config.to_h) .merge(@options.to_h) validate_config # ensure we have a logger configured @logger = @options[:logger] || ActiveSupport::Logger.new($stdout) @logger.info("Starting Poller with options=#{@options}") Signal.trap('INT') { raise Interrupt } Signal.trap('TERM') { raise Interrupt } @executor = Executor.new( max_threads: @options[:threads], logger: @logger, max_queue: @options[:backpressure], retry_standard_errors: @options[:retry_standard_errors] ) poll rescue Interrupt @logger.info 'Process Interrupted or killed - attempting to shutdown cleanly.' shutdown exit end