Repository navigation
feat: tidy every quiet announcement, reminder and banter, not just yesterday's banter - #194
Merged
Merged
Conversation
…sterday's banter The morning tidy only looked at the banter from the day before, so the Opened, Emptied and Reminder posts stayed in the channel for good, and so did the banter from before the tidy shipped or from a morning the bot was down. At 08:45 office time it now looks at every Opened, Emptied, Reminder and Banter post of its own that's still in Slack and was posted before that day, and deletes the ones with no reactions and no replies, by the same rule as before. A kept post or one Slack failed on is looked at again the next morning. Recording summaries and replies in threads are never touched. The first run catches up on the backlog; the Slack client already waits out rate limits. Closes #193
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #193
The morning tidy from #159 only looked at yesterday's banter. Opened, Emptied and Reminder posts were never deleted, and neither was banter from before the tidy shipped or from a morning the bot was down. In production that's 44 Opened, 45 Emptied, 23 Reminders and 54 bits of banter still in the channel.
What changes
Opened,Emptied,ReminderandBanterpost of its own that's still in Slack (deleted_at IS NULL) and was posted before that day, with no lower bound. It deletes the ones with no reactions and no replies, by the same rule as before.QuietBanteris nowQuietPosts, andSlackHistory.banterInSlackBetween(from, until)is nowtidiedPostsInSlackBefore(until). The domain term inCONTEXT.mdchanges from quiet banter to quiet post.docs/slack.mdinstead of the banter subsection, and the README, architecture, database and operations docs are updated to match.First run
The first morning catches up on the backlog, about 160 posts, each one
reactions.get+conversations.replies+chat.delete, one after another. The Slack client already retries rate limits after Slack'sRetry-After, and anything that still fails is tried again the next morning.No new Slack scopes, no migration.