lib/arql/commands/reconnect.rb in arql-0.1.23 vs lib/arql/commands/reconnect.rb in arql-0.1.24
- old
+ new
@@ -1,14 +1,14 @@
module Arql::Commands
module Reconnect
class << self
def reconnect
- Arql::SSHProxy.reconnect
+ Arql::SSHProxy.reconnect if Arql::App.config[:ssh].present?
ActiveRecord::Base.connection.reconnect! unless ActiveRecord::Base.connection.active?
end
def reconnect!
- Arql::SSHProxy.reconnect!
+ Arql::SSHProxy.reconnect! if Arql::App.config[:ssh].present?
ActiveRecord::Base.connection.reconnect!
end
end
Pry.commands.block_command 'reconnect' do