Add punt hook to drop admin-chosen messages#42
Open
dehnert wants to merge 1 commit intoroost-im:masterfrom
Open
Add punt hook to drop admin-chosen messages#42dehnert wants to merge 1 commit intoroost-im:masterfrom
dehnert wants to merge 1 commit intoroost-im:masterfrom
Conversation
Useful if there's a class with some useful messages, but also a high rate of messages that nobody needs to see that unnecessarily load the server.
Contributor
|
I'm not convinced I want this to be a function by default, but the idea is good. Do you want to filter on anything more than the class/instance/recipient tuple? |
Contributor
Author
|
My current function is: def ROOST_CHECK_PUNT(notice):
if (notice.cls == b'MOIRA' and notice.instance == b'incr-runner' and
notice.sender == b'smstest@ATHENA.MIT.EDU' and
len(notice.fields) >= 1 and
b'pipe child exits with signal 0 status 0' in notice.fields[0]):
return True
return Falseso I'm also matching on the body (on a theory that maybe I'm somewhat interested if there's a different error). (Something else an arbitrary function allows is dropping some percentage of traffic, which might be appealing in some use-cases.) |
Contributor
|
I understand why you want to do this, but now I've thought about it enough to realize why I don't like it: it can't be configured via |
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.
Useful if there's a class with some useful messages, but also a high rate of messages that nobody needs to see that unnecessarily load the server.