1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Merge pull request #2043 from seuros/conf_logger

Tell @kenips if he is using a config.
This commit is contained in:
Mike Perham 2014-11-05 10:37:06 -08:00
commit 64bee3bb83
2 changed files with 2 additions and 0 deletions

View file

@ -3,6 +3,7 @@ HEAD
- Fix typo for generator test file name [dlackty, #2016] - Fix typo for generator test file name [dlackty, #2016]
- Add Sidekiq::Middleware::Chain#prepend [seuros, #2029] - Add Sidekiq::Middleware::Chain#prepend [seuros, #2029]
- Debug: Print the used config file
3.2.6 3.2.6
----------- -----------

View file

@ -353,6 +353,7 @@ module Sidekiq
def parse_config(cfile) def parse_config(cfile)
opts = {} opts = {}
if File.exist?(cfile) if File.exist?(cfile)
logger.debug "Using config file: #{cfile}"
opts = YAML.load(ERB.new(IO.read(cfile)).result) || opts opts = YAML.load(ERB.new(IO.read(cfile)).result) || opts
opts = opts.merge(opts.delete(environment) || {}) opts = opts.merge(opts.delete(environment) || {})
parse_queues(opts, opts.delete(:queues) || []) parse_queues(opts, opts.delete(:queues) || [])