diff options
author | Fabio Pitino <fpitino@gitlab.com> | 2019-07-08 11:18:07 +0100 |
---|---|---|
committer | Fabio Pitino <fpitino@gitlab.com> | 2019-07-08 14:50:58 +0100 |
commit | 67de299bb6018bbf460b119404fbab70f3a325c0 (patch) | |
tree | eca957c4c225a52dd17c473f1074ab50bbf5a046 /spec/support/helpers | |
parent | ededb334c66fa25cb8518258d85b1f7da1dd8f26 (diff) | |
download | gitlab-ce-67de299bb6018bbf460b119404fbab70f3a325c0.tar.gz |
Allow ReactiveCaching to support nil value
When :calculate_reactive_caching returns a nil value
this caused ReactiveCaching to schedule a worker
every time the code using :with_reactive_cache was called.
This issue caused an increasing amount of Sidekiq jobs
being created continuously.
Implementing this fix behind feature flag
:reactive_caching_check_key_exists
Diffstat (limited to 'spec/support/helpers')
-rw-r--r-- | spec/support/helpers/reactive_caching_helpers.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/support/helpers/reactive_caching_helpers.rb b/spec/support/helpers/reactive_caching_helpers.rb index b76b53db0b9..528da37e8cf 100644 --- a/spec/support/helpers/reactive_caching_helpers.rb +++ b/spec/support/helpers/reactive_caching_helpers.rb @@ -10,7 +10,7 @@ module ReactiveCachingHelpers def stub_reactive_cache(subject = nil, data = nil, *qualifiers) allow(ReactiveCachingWorker).to receive(:perform_async) allow(ReactiveCachingWorker).to receive(:perform_in) - write_reactive_cache(subject, data, *qualifiers) unless data.nil? + write_reactive_cache(subject, data, *qualifiers) unless subject.nil? end def synchronous_reactive_cache(subject) |