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

Make it public #4

Merged
merged 15 commits into from
Oct 8, 2019
Merged

Make it public #4

merged 15 commits into from
Oct 8, 2019

Conversation

ricardo8990
Copy link

closes #2
closes #3

@ricardo8990 ricardo8990 added the enhancement New feature or request label Oct 7, 2019
@ricardo8990 ricardo8990 self-assigned this Oct 7, 2019
@ricardo8990
Copy link
Author

@pachCode @rogelioLpz actualmente esta fallando Travis porque el proyecto no es OpenSource, en cuanto le den aprobar, lo haré público y todo debería funcionar

try:
kinesis_client.create_stream(StreamName=stream_name, ShardCount=1)
except kinesis_client.exceptions.ResourceInUseException:
time.sleep(1)
Copy link
Member

Choose a reason for hiding this comment

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

Para que es el sleep?

Copy link
Author

Choose a reason for hiding this comment

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

Cuando haces muchas peticiones seguidas, AWS te manda esa excepción.

Comment on lines 12 to 13
tries=None,
num_workers=1,
Copy link
Member

Choose a reason for hiding this comment

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

Agregar type hinting

Copy link
Author

Choose a reason for hiding this comment

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

Listo

Comment on lines +48 to +60
record_ok = dict(
uuid='f3296986-ded8-11e9-8000-000000000000',
task='registered_task',
headers=dict(),
body=dict(),
)

record_missing_task = dict(
uuid='t89876702-cas9-22g1-9000-000000000000',
task='missing_task',
headers=dict(),
body=dict(),
)
Copy link
Member

@rogelioLpz rogelioLpz Oct 7, 2019

Choose a reason for hiding this comment

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

Los objetos que se leen de Kinesis tienen la siguiente estructura
https://docs.aws.amazon.com/en_us/kinesis/latest/APIReference/API_Record.html

Sería más apropiado tener esa misma estructura en los objetos del Test

Copy link
Author

Choose a reason for hiding this comment

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

La idea de la función process_records es qué solo procese esos records.
Puedes ver en el listener que ya solo envía la parte de Data, esto porque SequenceNumber y otros datos no son necesarios para procesar un record, entonces no tiene sentido estarlos enviando por todas las funciones

return workers_created


def find_decorated_functions(module):
Copy link
Member

Choose a reason for hiding this comment

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

Agregar type hinting

Copy link
Author

Choose a reason for hiding this comment

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

Listo

@rogelioLpz rogelioLpz self-requested a review October 8, 2019 01:00
Copy link
Member

@pachCode pachCode left a comment

Choose a reason for hiding this comment

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

Cuál es el ideal de números de workers que se deben inicializar?

@ricardo8990 ricardo8990 merged commit cfa6902 into master Oct 8, 2019
@ricardo8990 ricardo8990 deleted the make_it_public branch October 8, 2019 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrar Hub a Pipy y hacerlo repositorio público Método síncrono para enviar datos a través de Kinesis
3 participants