Commit 946eedbb authored by Kerri Miller's avatar Kerri Miller

Merge branch...

Merge branch '333713-allow-experiment-data-to-be-pushed-to-the-client-without-running-the-experiment' into 'master'

Allow experiment data to be pushed to the client without running the XP

See merge request gitlab-org/gitlab!64118
parents 280731e1 9e65911f
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment