Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An API for grouping together messages. #278

Merged
merged 1 commit into from Aug 21, 2014
Merged

Conversation

ralphbean
Copy link
Contributor

@@ -70,6 +70,34 @@ def __init__(self, internationalization_callable, **config):
self.__prefix__ = re.compile('^%s\.(%s)(\.(.*))?$' % (
config['topic_prefix_re'], self.__name__.lower()))

def conglomerate(self, messages, **config):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function doesn't do anything itself, I guess it's intended as such?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it's mentioned in the doc string that it does nothing by default. Subclasses are supposed to override it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doh! :)

@pypingou
Copy link
Member

One check, otherwise this looks good to me :)

ralphbean added a commit that referenced this pull request Aug 21, 2014
An API for grouping together messages.
@ralphbean ralphbean merged commit 891f6f5 into develop Aug 21, 2014
@ralphbean ralphbean deleted the feature/grouped branch August 21, 2014 13:22
ralphbean added a commit that referenced this pull request Aug 22, 2014
The first approach in #278 didn't provide enough support for what I
ended up needing to implement in fedmsg_meta_fedora_infrastructure.

The gist here is that fedmsg core will provide a ``BaseConglomerator``
class that plugins will extend.  It is an abstract base class, and
children will have to override three different methods for it to work
properly.

I already have a functioning Conglomerator for some bodhi messages that
I'll submit as a PR soon.
ralphbean added a commit to fedora-infra/fmn.consumer that referenced this pull request Jan 8, 2015
Here, handle_batch is modified to use the new `fedmsg.meta.conglomerate` call
introduced in fedora-infra/fedmsg#278.

Fixes fedora-infra/fmn#24.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants