summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Nijhof <jeroen@jeroennijhof.nl>2016-02-08 17:31:24 +0100
committerJeroen Nijhof <jeroen@jeroennijhof.nl>2016-02-08 17:31:24 +0100
commit897f18032a471e647e0d796c241f911ac1ad0cd8 (patch)
tree9066acf9088108d7c8c84d06fed301bfd93f28cf
parent9fdd605fd2e4550170e5ef088bec7c6d2585c4a5 (diff)
downloadgitlab-ce-backup-database-timeout-fix.tar.gz
Make sure there is a connection before using ActiveRecordbackup-database-timeout-fix
-rw-r--r--lib/backup/manager.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/backup/manager.rb b/lib/backup/manager.rb
index 099062eeb8b..4962f5e53ce 100644
--- a/lib/backup/manager.rb
+++ b/lib/backup/manager.rb
@@ -1,6 +1,9 @@
module Backup
class Manager
def pack
+ # Make sure there is a connection
+ ActiveRecord::Base.connection.reconnect!
+
# saving additional informations
s = {}
s[:db_version] = "#{ActiveRecord::Migrator.current_version}"