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

Facilitate overwriting of Consumer class #316

Conversation

AndreCimander
Copy link
Contributor

This is just a very minor nitpick, feel free to close it, but it would be nice to change the class of the Consumer without the need to completly replicate and overwrite .consume() :)

@Bogdanp
Copy link
Owner

Bogdanp commented Jun 6, 2020

This seems OK to me, but how about making it a class property instead?

@AndreCimander
Copy link
Contributor Author

I was thinking about adding it as a cls property, but the consumer classes are not yet defined.

We could go the @property route, though, this would also make it easier to add logic if one desires. How would you like it named? consumer / consumer_class? :)

    @property
    def consumer_class(self):
        return _RedisConsumer

@Bogdanp
Copy link
Owner

Bogdanp commented Jun 6, 2020

Ah, right, that makes sense. Yeah, consumer_class sounds good.

@Bogdanp
Copy link
Owner

Bogdanp commented Jun 8, 2020

Thanks! I have squashed and merged this.

@Bogdanp Bogdanp closed this Jun 8, 2020
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.

2 participants