Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More bugfixes to the background jobs #1044

Merged
merged 1 commit into from
Apr 25, 2024
Merged
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
2 changes: 1 addition & 1 deletion server/app/jobs/flag_duplicate_allele_registry_ids.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def perform
variants = Variant.where(id: ids)
variants.each do |variant|
if variant.flags.select{|f| f.state == 'open' && f.open_activity.note =~ /This Variant may be a duplicate and may need to be deprecated/ && f.open_activity.user_id == 385}.count == 0
Activity::FlagEntity.new(
Activities::FlagEntity.new(
flagging_user: civicbot_user,
flaggable: variant,
organization_id: nil,
Expand Down
4 changes: 2 additions & 2 deletions server/app/lib/importer/disease_ontology_mirror.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ def url_from_doid(doid)
def add_flags(disease, text)
civicbot_user = User.find(385)
(disease.evidence_items + disease.assertions).each do |obj|
if obj.flags.select{|f| f.state == 'open' && f.open_activity.note == text && c.open_activity.user_id == 385}.count == 0
Activity::FlagEntity.new(
if obj.flags.select{|f| f.state == 'open' && f.open_activity.note == text && f.open_activity.user_id == 385}.count == 0
Activities::FlagEntity.new(
flagging_user: civicbot_user,
flaggable: obj,
organization_id: nil,
Expand Down
6 changes: 3 additions & 3 deletions server/app/lib/importer/sequence_ontology_mirror.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ def process_obsolete_terms
text += " Replaced by #{term['replaced_by']}."
end
obsolete_type.variants.each do |variant|
if variant.flags.select{|f| f.state == 'open' && f.comments.select{|c| c.text =~ /obsolete Sequence Ontology term/ && c.user_id == 385}.count > 0}.count == 0
Actions::FlagEntity.new(
if variant.flags.select{|f| f.state == 'open' && f.open_activity.note =~ /obsolete Sequence Ontology term/ && f.open_activity.user_id == 385}.count == 0
Activities::FlagEntity.new(
flagging_user: civicbot_user,
flaggable: variant,
organization_id: nil,
comment: text
note: text
).perform
end
end
Expand Down
2 changes: 1 addition & 1 deletion server/app/lib/scrapers/human_phenotype_ontology.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def self.update
civicbot_user = User.find(385)
(p.evidence_items + p.assertions).each do |obj|
if obj.flags.select{|f| f.state == 'open' && f.open_activity.note =~ /deprecated HPO term/ && f.open_activity.user_id == 385}.count == 0
Activity::FlagEntity.new(
Activities::FlagEntity.new(
flagging_user: civicbot_user,
flaggable: obj,
organization_id: nil,
Expand Down
Loading