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 Refactor:Send Welcome Broadcast Notifications From Sidekiq (#9923) 2020-08-21 12:57:08 -04:00
chat_channels [deploy] Optimization:Index Chat Channel Memberships Async on Message Creation (#9491) 2020-07-24 09:52:42 -05:00
comments Refactor EdgeCache (#11684) 2020-12-02 14:20:22 -05:00
credits Refactor:Move Credit Counter Cache Sync to Sidekiq (#9972) 2020-08-24 14:20:11 -05:00
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 [deploy] Optimization:Use delete_by when Destroying HtmlVariant Trials and Successes (#10332) 2020-09-14 15:40:30 -05:00
listings Update bust_listings to service (#12050) 2020-12-29 09:52:34 +01:00
mentions [deploy] Use Action Mailer parameterized syntax (#8853) 2020-06-23 13:48:41 -05:00
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 [deploy] Refactor:Move remove_old_notifications Rake Task to Sidekiq (#9936) 2020-08-24 08:48:46 -04:00
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 Rubocop: move dot in multi-line calls to leading position (#9262) 2020-07-16 15:51:11 +02:00
slack/messengers Remove SlackBotPingWorker (#7587) 2020-04-29 08:51:36 -04:00
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 Use Rails 6 new features in the code (#8342) 2020-06-08 16:06:29 -04:00
bust_cache_base_worker.rb Force Unique Jobs for User Initiated Jobs and Cache Jobs (#7688) 2020-05-06 08:27:17 -05:00
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 Update data exporter to handle admin send (#10274) 2020-10-26 18:00:56 -04:00
sitemap_refresh_worker.rb Stop pinging sitemap tools locally (#10314) 2020-09-14 16:10:52 +02:00