Declare winner in digest count test (#20810)
This commit is contained in:
parent
40a834e110
commit
09705dab68
2 changed files with 5 additions and 8 deletions
|
|
@ -3,6 +3,7 @@ class EmailDigestArticleCollector
|
|||
include Instrumentation
|
||||
|
||||
ARTICLES_TO_SEND = "EmailDigestArticleCollector#articles_to_send".freeze
|
||||
RESULTS_COUNT = 7 # Winner of digest_count_03_18 field test
|
||||
|
||||
def initialize(user)
|
||||
@user = user
|
||||
|
|
@ -29,7 +30,7 @@ class EmailDigestArticleCollector
|
|||
.where("experience_level_rating > ? AND experience_level_rating < ?",
|
||||
experience_level_rating_min, experience_level_rating_max)
|
||||
.order(order)
|
||||
.limit(results_count)
|
||||
.limit(RESULTS_COUNT)
|
||||
else
|
||||
Article.select(:title, :description, :path)
|
||||
.published
|
||||
|
|
@ -39,7 +40,7 @@ class EmailDigestArticleCollector
|
|||
.not_authored_by(@user.id)
|
||||
.where("score > ?", 15)
|
||||
.order(order)
|
||||
.limit(results_count)
|
||||
.limit(RESULTS_COUNT)
|
||||
end
|
||||
|
||||
articles.length < 3 ? [] : articles
|
||||
|
|
@ -74,10 +75,4 @@ class EmailDigestArticleCollector
|
|||
@user.cached_followed_tag_names.any? ||
|
||||
@user.cached_antifollowed_tag_names.any?
|
||||
end
|
||||
|
||||
def results_count
|
||||
return 6 unless FeatureFlag.enabled?(:digest_results_count_testing)
|
||||
|
||||
(field_test(:digest_count_03_18, participant: @user)&.split("_")&.last || 6).to_i
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@
|
|||
experiments:
|
||||
digest_count_03_18:
|
||||
started_at: 2024-03-18
|
||||
ended_at: 2024-03-28
|
||||
winner: count_7
|
||||
variants:
|
||||
- count_6
|
||||
- count_4
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue