diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 03:10:15 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 03:10:15 +0300 |
commit | 46aea02972d6caaf34a11689e9e6ccfa9dcb538a (patch) | |
tree | 5e4e71724bdab97d6d3f57ed25e11e0c516383fb /app/experiments | |
parent | 83d921d51bd5bf8bd0ecd078706d7c037fb711cb (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/experiments')
-rw-r--r-- | app/experiments/application_experiment.rb | 13 |
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) |