diff options
Diffstat (limited to 'lib/gitlab/container_repository/tags/cache.rb')
-rw-r--r-- | lib/gitlab/container_repository/tags/cache.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/container_repository/tags/cache.rb b/lib/gitlab/container_repository/tags/cache.rb index ff457fb9219..47a6e67a5a1 100644 --- a/lib/gitlab/container_repository/tags/cache.rb +++ b/lib/gitlab/container_repository/tags/cache.rb @@ -48,14 +48,14 @@ module Gitlab ::Gitlab::Redis::Cache.with do |redis| # we use a pipeline instead of a MSET because each tag has # a specific ttl - redis.pipelined do + redis.pipelined do |pipeline| cacheable_tags.each do |tag| created_at = tag.created_at # ttl is the max_ttl_in_seconds reduced by the number # of seconds that the tag has already existed ttl = max_ttl_in_seconds - (now - created_at).seconds ttl = ttl.to_i - redis.set(cache_key(tag), created_at.rfc3339, ex: ttl) if ttl > 0 + pipeline.set(cache_key(tag), created_at.rfc3339, ex: ttl) if ttl > 0 end end end |