Skip to content
This repository was archived by the owner on Sep 26, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions app/models/subject.rb
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ def check_retire_by_vote
if assesment_classifications > 2
percentage_for_retire = retire_count / assesment_classifications.to_f
if percentage_for_retire >= workflow.retire_limit
self.retire!
increment_parents_subject_count_by -1 if parent_subject
increment_parents_subject_count_by -1 if self.retire! && parent_subject
end
end
end
Expand All @@ -149,12 +148,13 @@ def bad!
end

def retire!
return if status == "bad"
return if classifying_user_ids.length < workflow.retire_limit
return false if status == "bad"
return false if classifying_user_ids.length < workflow.retire_limit

status! 'retired'
subject_set.subject_completed_on_workflow(workflow) if ! workflow.nil?
# subject_set.inc_complete_secondary_subject 1 if type != 'root'

true
end

def activate!
Expand Down
2 changes: 1 addition & 1 deletion app/models/workflow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Workflow
field :key, type: String
field :label, type: String
field :first_task, type: String
field :retire_limit, type: Integer, default: 3
field :retire_limit, type: Float, default: 0.75
field :subject_fetch_limit, type: Integer, default: 10
field :generates_subjects, type: Boolean, default: true
field :generates_subjects_after, type: Integer, default: 0
Expand Down
2 changes: 2 additions & 0 deletions project/emigrant/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
"google_analytics_client_id": "UA-69673163-1"
},

"discuss_url": "http://forum.emigrantcity.nypl.org",

"forum": {
"type": "discourse",
"base_url": "http://forum.emigrantcity.nypl.org"
Expand Down
1 change: 1 addition & 0 deletions project/emigrant/workflows/mark.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"subject_fetch_limit":"10",
"generates_subjects": true,
"generates_subjects_for": "transcribe",
"retire_limit": 0.75,

"first_task":"mark_primary",

Expand Down