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-01 21:12:02 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-01 21:12:02 +0300
commitfb7b3d71b179f877dca72d86eccf29eeb9f883b7 (patch)
tree5d48b4763e2fd918b467b0955bc0e8b60fe771c9 /spec/spec_helper.rb
parentfaa19db44a5a4d0fb7a3be07319ca6201caa185a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 921d6503099..091627c8a38 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -506,3 +506,16 @@ module TouchRackUploadedFile
end
Rack::Test::UploadedFile.prepend(TouchRackUploadedFile)
+
+# Monkey-patch to enable ActiveSupport::Notifications for Redis commands
+module RedisCommands
+ module Instrumentation
+ def process(commands, &block)
+ ActiveSupport::Notifications.instrument('redis.process_commands', commands: commands) do
+ super(commands, &block)
+ end
+ end
+ end
+end
+
+Redis::Client.prepend(RedisCommands::Instrumentation)