diff --git a/app/models/question.rb b/app/models/question.rb index c89dedb..714d440 100644 --- a/app/models/question.rb +++ b/app/models/question.rb @@ -477,6 +477,8 @@ class Question < ActiveRecord::Base def add_prompt_to_queue num_prompts = 1000 # if less than 90% full, regenerate prompts + # we skip generating prompts if more than 90% full to + # prevent one busy marketplace for ruling the queue if $redis.llen(self.pq_key) < num_prompts * 0.9 prompts = self.catchup_choose_prompt(num_prompts) # clear list @@ -595,7 +597,7 @@ class Question < ActiveRecord::Base action_appearances = Appearance.count(:conditions => ["voter_id = ? AND question_id = ? AND answerable_type IS NOT ?", a.voter_id, a.question_id, nil]) - appearance_type = (action_appearances > 0) ? 'Stopped_Voting' : 'Bounce' + appearance_type = (action_appearances > 0) ? 'Stopped_Voting_Or_Clicking' : 'Bounce' csv << [ appearance_type, a.id, a.voter_id, a.question_id, a.prompt.left_choice.id, a.prompt.left_choice.data.strip, a.prompt.right_choice.id, a.prompt.right_choice.data.strip, a.prompt_id, 'NA', a.created_at, a.updated_at, 'NA', '', a.voter.identifier, 'TRUE'] end end -- libgit2 0.21.2