#!/opt/rubies/ruby-2.7.5/bin/ruby require 'sqspoller' puts "SQSPoller arguments check" ARGV.each do |arg| puts "arg: #{arg}" end POLLER_CONFIG_FILEPATH = ENV["POLLER_CONFIG_FILEPATH"] FK_ENVIRONMENT = ENV["FK_ENVIRONMENT"] AWS_ACCESS_KEY_ID = ENV["AWS_ACCESS_KEY_ID"] AWS_SECRET_ACCESS_KEY = ENV["AWS_SECRET_ACCESS_KEY"] AWS_REGION = ENV["AWS_REGION"] POLLER_LOGGER_FILEPATH = ENV["POLLER_LOGGER_FILEPATH"] || "/var/log/sqspoller.log" puts "#{POLLER_CONFIG_FILEPATH} - #{FK_ENVIRONMENT} - #{AWS_ACCESS_KEY_ID} - #{AWS_SECRET_ACCESS_KEY} - #{AWS_REGION} - #{POLLER_LOGGER_FILEPATH}" puts "Starting poller" SqsPoller.start_poller POLLER_CONFIG_FILEPATH, "#{FK_ENVIRONMENT}-queues", AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION, POLLER_LOGGER_FILEPATH puts "poller done"