diff options
author | rpereira2 <rpereira@gitlab.com> | 2019-04-01 23:07:28 +0530 |
---|---|---|
committer | rpereira2 <rpereira@gitlab.com> | 2019-04-01 23:07:28 +0530 |
commit | 53c6a2da6169d976c0e9c58005d2d5c349701305 (patch) | |
tree | f278c8d8c8d5001169cd5ac63b44ab586a6bcea2 | |
parent | a99aaf342b5e50dcd52898272ed40ff523c9afd4 (diff) | |
download | gitlab-ce-53c6a2da6169d976c0e9c58005d2d5c349701305.tar.gz |
Add argument to default reactive_cache_worker_finder
- This second argument is a catch-all that will catch all extra
arguments passed to the reactive_cache_worker_finder, so that it does
not fail in situations where there are more than one argument being
passed. Only the first argument will be used as id, all other arguments
will be ignored.
-rw-r--r-- | app/models/concerns/reactive_caching.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/concerns/reactive_caching.rb b/app/models/concerns/reactive_caching.rb index 5efcb94577b..55c51437b1d 100644 --- a/app/models/concerns/reactive_caching.rb +++ b/app/models/concerns/reactive_caching.rb @@ -94,7 +94,7 @@ module ReactiveCaching self.reactive_cache_refresh_interval = 1.minute self.reactive_cache_lifetime = 10.minutes - self.reactive_cache_worker_finder = ->(id) do + self.reactive_cache_worker_finder = ->(id, *_args) do find_by(primary_key => id) end |