diff --git a/app/models/payout.rb b/app/models/payout.rb index 1af42454..9cce937b 100644 --- a/app/models/payout.rb +++ b/app/models/payout.rb @@ -34,7 +34,7 @@ class Payout < ApplicationRecord scope :escrowed, -> { where(escrowed: true) } scope :released, -> { where(escrowed: false) } - VOTE_COUNT_REQUIRED = 14 + VOTE_COUNT_REQUIRED = 10 # x = ELO percentile (0-1) def self.calculate_multiplier(x) diff --git a/app/models/project.rb b/app/models/project.rb index 03d37487..130f64d8 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -543,17 +543,17 @@ def issue_payouts ship_event_vote_count = VoteChange.where(project: self).where("created_at > ?", ship.created_at).count # Only process ship events that have exactly 18 votes - next unless ship_event_vote_count == 14 + next unless ship_event_vote_count == 10 # Calculate cumulative vote count for this ship event payout votes_before_ship = VoteChange.where(project: self).where("created_at <= ?", ship.created_at).count - cumulative_vote_count_at_payout = votes_before_ship + 14 + cumulative_vote_count_at_payout = votes_before_ship + 10 puts "Ship #{ship.id} created at #{ship.created_at}: votes_before=#{votes_before_ship}, cumulative=#{cumulative_vote_count_at_payout}" # Find when this ship event got its 18th vote # This is when votes_before_ship + votes after ship creation = cumulative_vote_count_at_payout - ship_votes_needed = 14 + ship_votes_needed = 10 target_vote_count = votes_before_ship + ship_votes_needed # Get the project's ELO rating when it reached this target vote count diff --git a/app/services/user_vote_queue_matchup_service.rb b/app/services/user_vote_queue_matchup_service.rb index c5c5e8ac..9648be82 100644 --- a/app/services/user_vote_queue_matchup_service.rb +++ b/app/services/user_vote_queue_matchup_service.rb @@ -80,8 +80,8 @@ def build! @unpaid_projects = @projects_with_time.select { |p| !p[:is_paid] } @paid_projects = @projects_with_time.select { |p| p[:is_paid] } - @mature_unpaid_projects = @projects_with_time.select { |p| p[:votes_count].to_i >= 12 && !p[:is_paid] } - @immature_unpaid_projects = @projects_with_time.select { |p| p[:votes_count].to_i < 12 && !p[:is_paid] } + @mature_unpaid_projects = @projects_with_time.select { |p| p[:votes_count].to_i >= 10 && !p[:is_paid] } + @immature_unpaid_projects = @projects_with_time.select { |p| p[:votes_count].to_i < 5 && !p[:is_paid] } self end