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

asyncio-iot #491

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

asyncio-iot #491

wants to merge 1 commit into from

Conversation

94nj111
Copy link

@94nj111 94nj111 commented Jan 9, 2025

No description provided.

@94nj111
Copy link
Author

94nj111 commented Jan 9, 2025

image

Copy link

@KKvladys KKvladys left a comment

Choose a reason for hiding this comment

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

Gj!

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Great job on implementing the asynchronous operations and meeting the task requirements! 🎉 The code is well-structured and effectively uses asyncio. Just a couple of minor suggestions: consider removing the redundant call to self.send_msg(msg) in service.py to streamline the code, and adding a comment in the .gitignore file to clarify why the .venv/ directory is ignored. Keep up the excellent work! 🚀

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

@@ -3,6 +3,6 @@
*.iml
.env
.DS_Store
venv/
.venv/

Choose a reason for hiding this comment

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

Consider adding a comment to explain why the .venv/ directory is being ignored. This can help other developers understand the purpose of this entry.

del self.devices[device_id]

def get_device(self, device_id: str) -> Device:
return self.devices[device_id]

def run_program(self, program: list[Message]) -> None:
async def run_program(self, program: list[Message]) -> None:
print("=====RUNNING PROGRAM======")
for msg in program:
self.send_msg(msg)

Choose a reason for hiding this comment

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

The call to self.send_msg(msg) is redundant since await self.send_msg(msg) is already being called in the next line. You should remove this line to avoid unnecessary operations.

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.

3 participants