Skip to content

Commit

Permalink
Merge pull request #2 from zooniverse/edit-beta-size
Browse files Browse the repository at this point in the history
Update Beta List Params
  • Loading branch information
lcjohnso authored Dec 11, 2023
2 parents 3fa2ea0 + 1092b58 commit 6337582
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions panoptes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def general_lists
end

def beta_lists
@beta_lists ||= %w[beta_list_1 beta_list_2 beta_list_3].map do |list_name|
@beta_lists ||= %w[beta_list_1 beta_list_2 beta_list_3 beta_list_4].map do |list_name|
{
'uuid' => SecureRandom.uuid,
'name' => list_name,
Expand All @@ -121,7 +121,7 @@ def split_beta_lists
return @split_beta_lists if @split_beta_lists

@split_beta_lists = {}
shuffled_beta_list.each_slice(50000).with_index do |a, i|
shuffled_beta_list.each_slice(75000).with_index do |a, i|
@split_beta_lists["beta_list_#{i}"] = a
end
@split_beta_lists
Expand Down
3 changes: 2 additions & 1 deletion sync.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@
puts 'Subscribing general lists...'
listmonk.subscribe_users(panoptes.list_emailable_users.except('beta_email_communication'))

# Subscribe only 3 beta sublists
# Subscribe 4 beta sublists
puts 'Subscribing beta lists...'
listmonk.subscribe_users({ 'beta_list_1' => panoptes.split_beta_lists['beta_list_1'] })
listmonk.subscribe_users({ 'beta_list_2' => panoptes.split_beta_lists['beta_list_2'] })
listmonk.subscribe_users({ 'beta_list_3' => panoptes.split_beta_lists['beta_list_3'] })
listmonk.subscribe_users({ 'beta_list_4' => panoptes.split_beta_lists['beta_list_4'] })

puts 'Subscribing project lists...'
grouped_by_project = panoptes.project_emailable_users.group_by { |h| h['slug'] }
Expand Down

0 comments on commit 6337582

Please sign in to comment.