[MM-37013] Async job to fix CRT channel unreads (#18340)

Summary
The addition of the TotalMsgCountRoot and MsgCountRoot columns to support CRT caused several issues with previously read threads and channels being marked as unread. Previously we attempted to fix this purely in a SQL migration [MM-35345][MM-35494] fixes for incorrect mentions and unreads for threads and channels #17803 but that turned out to be too heavy and it was decided to break up some of the fixes into async jobs.
This PR implements an async job to mark channels as read if there are no user posts since the last time the user viewed the channel. 

Ticket Link
https://mattermost.atlassian.net/browse/MM-37013
Этот коммит содержится в:
Ashish Bhate
2021-11-18 15:31:18 +05:30
коммит произвёл GitHub
родитель 12dc171a60
Коммит 0da249c651
21 изменённых файлов: 623 добавлений и 2 удалений

Просмотреть файл

@@ -7523,6 +7523,22 @@
"id": "extract_content.worker.do_job.file_info",
"translation": "Failed to get file information for content extraction."
},
{
"id": "fix_crt_channel_unreads.worker.do_job.get_bad_channel_memberships",
"translation": "Failed to get bad channel memberships"
},
{
"id": "fix_crt_channel_unreads.worker.do_job.get_post_types",
"translation": "Failed to get unique post types"
},
{
"id": "fix_crt_channel_unreads.worker.do_job.kill_orphan_jobs",
"translation": "Killing orphaned jobs"
},
{
"id": "fix_crt_channel_unreads.worker.do_job.mark_channel_as_read",
"translation": "Failed to mark channel as read"
},
{
"id": "group_not_associated_to_synced_team",
"translation": "Group cannot be associated to the channel until it is first associated to the parent group-synced team."