lib/article_status_manager.rb
# Check whether any deleted pages still exist with a different article_id.
# If so, update the Article to use the new id.
Check whether any deleted pages still exist with a different article_id.
If so, update the Article to use the new id.
Check whether any deleted pages still exist with a different article_id . If so update the Article to use the new id .
def update_article_ids(deleted_page_ids)
    maybe_deleted = Article.where(mw_page_id: deleted_page_ids, wiki_id: @wiki.id)
    request_results = Replica.new(@wiki).post_existing_articles_by_title maybe_deleted
    @failed_request_count += 1 if request_results.nil?
    request_results&.each do |stp|
      resolve_page_id(stp, deleted_page_ids)
    end
  end
def update_article_ids ( deleted_page_ids ) maybe_deleted = Article . where ( mw_page_id : deleted_page_ids , wiki_id : @wiki . id ) request_results = Replica . new ( @wiki ) . post_existing_articles_by_title maybe_deleted @failed_request_count += 1 if request_results . nil? request_results &. each do | stp | resolve_page_id ( stp , deleted_page_ids ) end end
Check whether any deleted pages still exist with a different article_id.
Check whether any deleted pages still exist with a different article_id .
# These pages have titles that match Articles in our DB with deleted ids # Update articles whose IDs have changed (keyed on title and namespace)
deleted_page_ids
<not_specific>