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:
authorBob Van Landuyt <bob@gitlab.com>2017-06-12 15:16:03 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2017-06-26 18:49:30 +0300
commit1ebb2255362788b8c34fb4120ed9e2ba478ee53b (patch)
tree97e31854d183ad0710602e9d91b20ac8d67bd664 /lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb
parentc98ed42d01d4a15ce2a588079601b7d620b029ff (diff)
More logging so we know we have the rename in redis
Diffstat (limited to 'lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb')
-rw-r--r--lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb b/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb
index 29f21b08e6c..3bf549a56eb 100644
--- a/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb
+++ b/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb
@@ -125,7 +125,11 @@ module Gitlab
def track_rename(type, old_path, new_path)
key = redis_key_for_type(type)
- Gitlab::Redis.with { |redis| redis.lpush(key, [old_path, new_path].to_json) }
+ Gitlab::Redis.with do |redis|
+ redis.lpush(key, [old_path, new_path].to_json)
+ redis.expire(key, 2.weeks.to_i)
+ end
+ say "tracked rename: #{key}: #{old_path} -> #{new_path}"
end
def reverts_for_type(type)