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>2021-06-16 03:10:15 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-16 03:10:15 +0300
commit46aea02972d6caaf34a11689e9e6ccfa9dcb538a (patch)
tree5e4e71724bdab97d6d3f57ed25e11e0c516383fb /app/experiments
parent83d921d51bd5bf8bd0ecd078706d7c037fb711cb (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/experiments')
-rw-r--r--app/experiments/application_experiment.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/app/experiments/application_experiment.rb b/app/experiments/application_experiment.rb
index 93c94b0c16e..53ea8ea2d3a 100644
--- a/app/experiments/application_experiment.rb
+++ b/app/experiments/application_experiment.rb
@@ -16,11 +16,14 @@ class ApplicationExperiment < Gitlab::Experiment # rubocop:disable Gitlab/Namesp
track(:assignment) # track that we've assigned a variant for this context
- begin
- Gon.push({ experiment: { name => signature } }, true) # push the experiment data to the client
- rescue NoMethodError
- # means we're not in the request cycle, and can't add to Gon. Log a warning maybe?
- end
+ push_to_client
+ end
+
+ # push the experiment data to the client
+ def push_to_client
+ Gon.push({ experiment: { name => signature } }, true)
+ rescue NoMethodError
+ # means we're not in the request cycle, and can't add to Gon. Log a warning maybe?
end
def track(action, **event_args)