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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-08-19 18:11:58 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-19 18:11:58 +0300
commit4c083c816333ef903fe7c32f412eaa53d7b959d3 (patch)
tree199c0a0034a2620374a92a47762bf4a4c07be7ca /lib/gitlab/diff
parent35d5ae4e3de6444c02725b965ef59774d6256d8e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/diff')
-rw-r--r--lib/gitlab/diff/highlight_cache.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/gitlab/diff/highlight_cache.rb b/lib/gitlab/diff/highlight_cache.rb
index 44e3e9987f7..084ce63e36a 100644
--- a/lib/gitlab/diff/highlight_cache.rb
+++ b/lib/gitlab/diff/highlight_cache.rb
@@ -135,9 +135,9 @@ module Gitlab
#
def write_to_redis_hash(hash)
Gitlab::Redis::Cache.with do |redis|
- redis.pipelined do
+ redis.pipelined do |pipeline|
hash.each do |diff_file_id, highlighted_diff_lines_hash|
- redis.hset(
+ pipeline.hset(
key,
diff_file_id,
gzip_compress(highlighted_diff_lines_hash.to_json)
@@ -147,7 +147,7 @@ module Gitlab
end
# HSETs have to have their expiration date manually updated
- redis.expire(key, expiration)
+ pipeline.expire(key, expiration)
end
record_memory_usage(fetch_memory_usage(redis, key))
@@ -202,9 +202,9 @@ module Gitlab
expiration_period = expiration
Gitlab::Redis::Cache.with do |redis|
- redis.pipelined do
- results = redis.hmget(cache_key, file_paths)
- redis.expire(key, expiration_period) if highlight_diffs_renewable_expiration_enabled
+ redis.pipelined do |pipeline|
+ results = pipeline.hmget(cache_key, file_paths)
+ pipeline.expire(key, expiration_period) if highlight_diffs_renewable_expiration_enabled
end
end