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

Refactor Producer #15

Closed

Conversation

tvoinarovskyi
Copy link
Member

No description provided.

@tvoinarovskyi tvoinarovskyi changed the title Sync with kafkapython v0.9.5 Refactor Producer Feb 16, 2016
future = asyncio.open_connection(self.host, self.port, loop=self._loop)
self._reader, self._writer = yield from asyncio.wait_for(
future, self._config['request_timeout_ms']/1000)
self._read_task = asyncio.ensure_future(self._read(), loop=self._loop)
Copy link
Member

Choose a reason for hiding this comment

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

Not backward compatible, not all version of python 3.4.x support ensure_future

Copy link
Member

Choose a reason for hiding this comment

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

@jettify
Copy link
Member

jettify commented Feb 16, 2016

Can we split this PR in smaller ones? It is hard to review...

raise KafkaUnavailableError("All servers failed to process request")
def close(self):
if self._sync_task:
self._sync_task.cancel()
Copy link
Member

Choose a reason for hiding this comment

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

Proper task cancel is required, you need to yield from self._sync_task somewhere

@asvetlov
Copy link
Member

Honestly I did not dig deep inside proposed changes -- the patch is huge.
Splitting PR into small pieces is desirable but I can live with big change if splitting is too hard for you, guys.

@tvoinarovskyi
Copy link
Member Author

Sorry, I'm kinda used to making "pre-review" pull-requests into separate branches (it's just so easy to read it on GitHub), this should not have been reviewed yet, we're still prototyping. Sorry

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.

4 participants