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
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/backup/database.rb1
-rw-r--r--lib/repository_cache.rb8
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/backup/database.rb b/lib/backup/database.rb
index b8aa6b9ff2f..c5a5396cbbf 100644
--- a/lib/backup/database.rb
+++ b/lib/backup/database.rb
@@ -25,6 +25,7 @@ module Backup
abort 'Backup failed' unless success
$progress.print 'Compressing database ... '
+ FileUtils.rm_f db_file_name_gz
success = system('gzip', db_file_name)
report_success(success)
abort 'Backup failed: compress error' unless success
diff --git a/lib/repository_cache.rb b/lib/repository_cache.rb
index fa016a170cd..8ddc3511293 100644
--- a/lib/repository_cache.rb
+++ b/lib/repository_cache.rb
@@ -18,4 +18,12 @@ class RepositoryCache
def fetch(key, &block)
backend.fetch(cache_key(key), &block)
end
+
+ def exist?(key)
+ backend.exist?(cache_key(key))
+ end
+
+ def read(key)
+ backend.read(cache_key(key))
+ end
end