docbrown/app/workers
Daniel Uber 16d17445a5
reenable article rescoring when moderators flag users (#12983)
* Update worker calculation and disable early return

* Enable service tests

This updates the test to look at the individual article scores
changing, rather than the sum of the articles scores changing

The scores lambda was added as a way to observe this eagerly

* Correctly handle raising the score when vomit is cleared

The initial implementation loaded the articles reactions and the
user's reactions in order to rescore. This restores that activity.

It occurs to me that article.reactions.sum(:points) +
user.reactions.sum(:points) feels like something articles should know
how to do, in which case we can move this into article (#rescore!)?
and call that instead of knowing how to handle moderation specially here.

* Move logic to Article#update_score

Having realized "sum of reaction scores" was an Article concern, I
found that we have a worker to score articles that does _exactly_ what
we're doing here.

Let's use that and allow the vomit reaction presence or absence on a
user to automatically affect the article calculations.

This is at least n + 1 and maybe worse.
2021-03-16 14:04:13 -05:00
..
articles Refactor cache purging (#12811) 2021-03-02 10:09:05 -05:00
badge_achievements Split BadgeRewarder into multiple services (#11902) 2020-12-23 09:55:06 -05:00
broadcasts
chat_channels
comments Refactor EdgeCache (#11684) 2020-12-02 14:20:22 -05:00
credits
emails Refactor:Use dev_to? to Check for DEV (#12083) 2020-12-30 14:34:00 -06:00
events Update bust_events to EdgeCache::BustEvents (#11955) 2020-12-21 14:43:28 -05:00
feeds Remove RssReader (#12169) 2021-01-08 11:45:15 -05:00
follows Optimization:Enforce Uniqueness for Follows::UpdatePointsWorker and RatingVotes::AssignRatingWorker (#12852) 2021-03-02 10:50:44 -06:00
github_repos Bug Fix:Update updated_at Timestamp Everytime We Run Repo Sync Worker (#12853) 2021-03-01 13:45:10 -06:00
html_variants
listings Update bust_listings to service (#12050) 2020-12-29 09:52:34 +01:00
mentions
metrics Add Message to the postgres.db_table_size dataset on Datadog (#12516) 2021-02-01 12:41:12 -05:00
moderator reenable article rescoring when moderators flag users (#12983) 2021-03-16 14:04:13 -05:00
notifications
organizations Update bust_organization to EdgeCache::BustOrganization (#12048) 2020-12-29 09:48:36 +01:00
pages Update .bust_page to EdgeCache::BustPage (#11952) 2020-12-18 11:21:54 -05:00
podcast_episodes Update bust_podcast_episode to EdgeCache::BustPodcastEpisode (#12049) 2020-12-29 09:49:13 +01:00
podcasts Update bust_podcast to EdgeCache::BustPodcast (#12047) 2020-12-29 09:49:59 +01:00
push_notifications Add mobile push notifications to Forem (#12419) 2021-03-12 14:08:18 -06:00
rating_votes Optimization:Enforce Uniqueness for Follows::UpdatePointsWorker and RatingVotes::AssignRatingWorker (#12852) 2021-03-02 10:50:44 -06:00
reactions Refactor cache purging (#12811) 2021-03-02 10:09:05 -05:00
search
slack/messengers
tags Add guard clause to worker (#12632) 2021-02-11 10:43:48 +07:00
users Declare winner in feed_top_articles_query test (#12308) 2021-02-04 13:02:00 -05:00
webhook
bust_cache_base_worker.rb
bust_cache_path_worker.rb Update bust to EdgeCache::Bust (#12052) 2020-12-29 09:53:15 +01:00
data_update_worker.rb Add ability to re-run a data script from the the data update script page (#12424) 2021-02-02 17:24:39 +02:00
export_content_worker.rb
sitemap_refresh_worker.rb