Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tasks/dev.rake')
-rw-r--r--lib/tasks/dev.rake3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/tasks/dev.rake b/lib/tasks/dev.rake
index 08a11100431..48bf49ff284 100644
--- a/lib/tasks/dev.rake
+++ b/lib/tasks/dev.rake
@@ -50,6 +50,9 @@ namespace :dev do
connection.execute(cmd)
rescue ActiveRecord::NoDatabaseError
end
+
+ # Clear connections opened by this rake task too
+ ActiveRecord::Base.clear_all_connections! # rubocop:disable Database/MultipleDatabases
end
end