-
Notifications
You must be signed in to change notification settings - Fork 59
Codec support for writer #198
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
Conversation
1400ae5
to
dfb2af4
Compare
dfb2af4
to
3902748
Compare
95d007b
to
1104d9d
Compare
self._messages_future.extend(messages_future) | ||
|
||
for m in internal_messages: | ||
self._new_messages.put_nowait(m) | ||
if self._codec == PublicCodec.RAW: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If need encode message - send it to encode loop, else - direct add to send queue.
encode_waiters = [] | ||
encoder_function = self._codec_functions[codec] | ||
|
||
for message in messages: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
start encode messages in parallel
self._codec_selector_batch_num += 1 | ||
return codec | ||
|
||
async def _get_available_codecs(self) -> List[PublicCodec]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get allowed codec from server and intersect it with supported codecs with encoders map.
If server side has no codec restriction - use raw and gzip only (for better compatibility with readers).
fe741fa
to
ccc6eec
Compare
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Pull request type
Please check the type of change your PR introduces: