我使用的是rails "Shoryuken“gem,但当我启动rails服务器时,在我的开发环境中的队列中出现了验证错误,下面是错误:-
gems/shoryuken-2.0.11/lib/shoryuken/environment_loader.rb:172:in ` `validate_queues':指定的队列"development_worker“不存在(ArgumentError)
我已经使用了以下设置:
config/config yuken.yml
aws:
access_key_id: <%= ENV["SQS_IAM"] %>
secret_access_key: <%= ENV["SQS_IAM_SECRET"] %>
region: <%= ENV["SQS_IAM_REGION"] %>
concurrency: 25 # The number of allocated threads to process messages. Default 25
delay: 0 # The delay in seconds to pause a queue when it's empty. Default 0
queues:
- ["<%= Rails.env %>_worker", 1]初始值设定项/shoryuken.rb yuken.rb
def parse_config(config_file)
if File.exist?(config_file)
YAML.load(ERB.new(IO.read(config_file)).result)
else
raise ArgumentError, "Config file #{config_file} does not exist"
end
end
config = parse_config([Dir.pwd, 'config/shoryuken.yml'].join('/')).deep_symbolize_keys
Shoryuken::EnvironmentLoader.load(config)我希望队列应该是特定于环境的。
发布于 2017-08-09 20:42:31
https://stackoverflow.com/questions/45590894
复制相似问题