-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Custom endpoint_url and 'ShardId' #28
base: master
Are you sure you want to change the base?
Conversation
nicholasball
commented
Nov 16, 2020
- Add custom endpoint_url to consumer/producer and state
- Return 'ShardId' in item
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.
Looks good to me!
Is there anything I can do to move this forward? I really need this PR merged :) |
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.
Hi @nicholasball,
I'm 👍 on the end point change, but would like to change the semantics of how the shard_id is returned to keep the data envelope stable for existing use cases.
We also will need a test that covers return_shard_id
.
item['ShardId']=shard_id | ||
log.debug(item) | ||
yield item |
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.
I do not like the idea mutating the item.
Instead of adding the ShardId
to the item what do you think about adding another option to init (something like return_shard_id=False
) that if true would change the yield to:
if self.return_shard_id:
yield shard_id, item
else:
yield item