forked from discourse/discourse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DEV: Move user count update for channels to ensure_consistency! (disc…
…ourse#22321) This fixes a longstanding TODO to move the contents of the UpdateUserCountsForChannels job to the ensure_consistency! method of Chat::Channel, which runs every 15 mins as part of periodical updates. This commit also addresses the performance issue of the original, where we would fetch all channels and do an individual query to get the count and update the count of each one. Now we do it all in one query, and only publish the changed channels to the UI.
- Loading branch information
1 parent
db80a8c
commit f6072ba
Showing
5 changed files
with
161 additions
and
123 deletions.
There are no files selected for viewing
32 changes: 0 additions & 32 deletions
32
plugins/chat/app/jobs/scheduled/chat/update_user_counts_for_channels.rb
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 0 additions & 59 deletions
59
plugins/chat/spec/jobs/scheduled/update_user_counts_for_channels_spec.rb
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters