mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
updated checks of environment with Rails.env by Rails.env methods
This commit is contained in:
@@ -42,7 +42,7 @@ module DiscourseHub
|
||||
end
|
||||
|
||||
def self.hub_base_url
|
||||
if Rails.env == 'production'
|
||||
if Rails.env.production?
|
||||
'http://api.discourse.org/api'
|
||||
else
|
||||
ENV['HUB_BASE_URL'] || 'http://local.hub:3000/api'
|
||||
|
||||
@@ -58,7 +58,7 @@ module Import
|
||||
rescue SystemExit
|
||||
log "Restore process was cancelled!"
|
||||
rollback
|
||||
rescue Exception => ex
|
||||
rescue => ex
|
||||
log "EXCEPTION: " + ex.message
|
||||
log ex.backtrace.join("\n")
|
||||
rollback
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module Scheduler
|
||||
module Deferrable
|
||||
def initialize
|
||||
@async = Rails.env != "test"
|
||||
@async = !Rails.env.test?
|
||||
@queue = Queue.new
|
||||
@mutex = Mutex.new
|
||||
@thread = nil
|
||||
|
||||
Reference in New Issue
Block a user