Skip to content

Commit

Permalink
Fix initialization when the Load Rails option is specified
Browse files Browse the repository at this point in the history
  • Loading branch information
yujideveloper committed Apr 20, 2016
1 parent ad38827 commit 654536c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/shoryuken/environment_loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ def initialize(options)
end

def load
initialize_options
initialize_logger
load_rails if options[:rails]
if options[:rails]
load_rails
else
initialize_options
initialize_logger
end
merge_cli_defined_queues
prefix_active_job_queue_names
parse_queues
Expand Down Expand Up @@ -98,6 +101,7 @@ def load_rails

# Reload options with Rails environment (see PR #195)
initialize_options
initialize_logger

Shoryuken.logger.info { 'Rails environment loaded' }
end
Expand Down

0 comments on commit 654536c

Please sign in to comment.