Refactor: Remove more_tag_weight_more_random_experiment (#11447)
This commit is contained in:
parent
eaf3403091
commit
cf619caf70
4 changed files with 7 additions and 20 deletions
|
|
@ -3,7 +3,6 @@ module Stories
|
|||
respond_to :json
|
||||
|
||||
VARIANTS = {
|
||||
"more_tag_weight_more_random_experiment" => :more_tag_weight_more_random_experiment,
|
||||
"more_comments_experiment" => :more_comments_experiment,
|
||||
"more_tag_weight_randomized_at_end_experiment" => :more_tag_weight_randomized_at_end_experiment,
|
||||
"more_comments_randomized_at_end_experiment" => :more_comments_randomized_at_end_experiment,
|
||||
|
|
|
|||
|
|
@ -60,13 +60,6 @@ module Articles
|
|||
stories
|
||||
end
|
||||
|
||||
def more_tag_weight_more_random_experiment
|
||||
@tag_weight = 2
|
||||
@randomness = 7
|
||||
_featured_story, stories = default_home_feed_and_featured_story(user_signed_in: true)
|
||||
stories
|
||||
end
|
||||
|
||||
# Test variation: the more comments a post has, the higher it's rated!
|
||||
def more_comments_experiment
|
||||
@comment_weight = 2
|
||||
|
|
@ -89,20 +82,18 @@ module Articles
|
|||
end
|
||||
|
||||
def mix_of_everything_experiment
|
||||
case rand(7)
|
||||
case rand(6)
|
||||
when 0
|
||||
default_home_feed(user_signed_in: true)
|
||||
when 1
|
||||
more_tag_weight_more_random_experiment
|
||||
when 2
|
||||
more_comments_experiment
|
||||
when 3
|
||||
when 2
|
||||
more_tag_weight_randomized_at_end_experiment
|
||||
when 4
|
||||
when 3
|
||||
more_comments_randomized_at_end_experiment
|
||||
when 5
|
||||
when 4
|
||||
more_comments_medium_weight_randomized_at_end_experiment
|
||||
when 6
|
||||
when 5
|
||||
more_comments_minimal_weight_randomized_at_end_experiment
|
||||
else
|
||||
default_home_feed(user_signed_in: true)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ experiments:
|
|||
user_home_feed: # Home feed collection for logged in user
|
||||
variants:
|
||||
- base
|
||||
- more_tag_weight_more_random_experiment
|
||||
- more_comments_experiment
|
||||
- mix_of_everything_experiment
|
||||
- more_tag_weight_randomized_at_end_experiment
|
||||
|
|
@ -10,10 +9,9 @@ experiments:
|
|||
- more_comments_medium_weight_randomized_at_end_experiment
|
||||
- more_comments_minimal_weight_randomized_at_end_experiment
|
||||
weights:
|
||||
- 10
|
||||
- 15
|
||||
- 10
|
||||
- 10
|
||||
- 15
|
||||
- 15
|
||||
- 15
|
||||
- 20
|
||||
- 10
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
require "rails_helper"
|
||||
|
||||
NON_DEFAULT_EXPERIMENTS = %i[
|
||||
more_tag_weight_more_random_experiment
|
||||
more_comments_experiment
|
||||
more_tag_weight_randomized_at_end_experiment
|
||||
more_comments_randomized_at_end_experiment
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue