Skip to content
Snippets Groups Projects
Commit 2a1714d8 authored by Vasilii Iakliushin's avatar Vasilii Iakliushin :two:
Browse files

Fix strong_memoize usages in mirror services

Contributes to #454341

**Problem**

This bug was spotted during the review. We used a `strong_memoize`
method without taking a method paramaters in the account. Luckly, this
method was called only once and didn't cause any problems.

**Solution**

Use `strong_memoize_with` that supports method parameters.
parent dd8b9d80
No related branches found
No related tags found
1 merge request!148641Fix strong_memoize usages in mirror services
......@@ -37,7 +37,7 @@ def execute(remote_mirror, tries)
private
def normalized_url(url)
strong_memoize(:normalized_url) do
strong_memoize_with(:normalized_url, url) do
CGI.unescape(Gitlab::UrlSanitizer.sanitize(url))
end
end
......
......@@ -60,7 +60,7 @@ def execute
private
def normalized_url(url)
strong_memoize(:normalized_url) do
strong_memoize_with(:normalized_url, url) do
CGI.unescape(Gitlab::UrlSanitizer.sanitize(url))
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment