mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Add support for APP_ENV, #984
This commit is contained in:
parent
1d11ae3a01
commit
95fa5d9019
1 changed files with 5 additions and 1 deletions
|
@ -182,7 +182,11 @@ module Sidekiq
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_environment(cli_env)
|
def set_environment(cli_env)
|
||||||
@environment = cli_env || ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development"
|
# See #984 for discussion.
|
||||||
|
# APP_ENV is now the preferred ENV term since it is not tech-specific.
|
||||||
|
# Both Sinatra 2.0+ and Sidekiq support this term.
|
||||||
|
# RACK_ENV and RAILS_ENV are there for legacy support.
|
||||||
|
@environment = cli_env || ENV["APP_ENV"] || ENV["RACK_ENV"] || ENV["RAILS_ENV"] || "development"
|
||||||
end
|
end
|
||||||
|
|
||||||
def symbolize_keys_deep!(hash)
|
def symbolize_keys_deep!(hash)
|
||||||
|
|
Loading…
Reference in a new issue