You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To ensure the Database is reachable before some commands (such as setuping a new Drupal instance).
namespace :db do
desc "Ensure the Database is reachable"
task :check do
on roles(:app) do
within release_path.join(fetch(:app_path)) do
output = capture(:drush, "status")
dbstatus = false
output.each_line do |line|
if line.include?("Database") && line.include?("Connected")
dbstatus = true
end
end
if dbstatus == false
sqlconnect = capture(:drush, "sql:connect")
raise "The Database seems not reachable. Be sure the following SQL connection is valid '#{sqlconnect}'."
end
end
end
end
The text was updated successfully, but these errors were encountered:
To ensure the Database is reachable before some commands (such as setuping a new Drupal instance).
The text was updated successfully, but these errors were encountered: