in lib/aws/active_job/sqs/poller.rb [18:38]
def run
init_config
config = Aws::ActiveJob::SQS.config
Signal.trap('INT') { raise Interrupt }
Signal.trap('TERM') { raise Interrupt }
@executor = Executor.new(
max_threads: config.threads,
logger: @logger,
max_queue: config.backpressure,
error_handler: config.poller_error_handler
)
poll
rescue Interrupt
@logger.info 'Process Interrupted or killed - attempting to shutdown cleanly.'
shutdown(config.shutdown_timeout)
exit
end