Skip to content

Commit

Permalink
Merge pull request leouofa#112 from realstorypro/cleanup-tweets
Browse files Browse the repository at this point in the history
added a commented out maintenance task for future reference
  • Loading branch information
Leonid Medovyy authored Jul 28, 2023
2 parents 8ee8269 + c3ad3bf commit ab7e55c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/tasks/blueprints.rake
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,8 @@ namespace :blueprints do
# delete unprocessed stories with inactive subtopics
dead_stories = Story.unprocessed.joins(:sub_topic).where(sub_topics: { active: false })
dead_stories.destroy_all

# Retroactively disapprove of tweets with disabled subtopic
# Story.joins(:sub_topic).where(sub_topic: { active: false }).joins(discussion: :tweet).each { |s| s.discussion.tweet.update(approved: false) }
end
end

0 comments on commit ab7e55c

Please sign in to comment.