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

Solution #492

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

Solution #492

wants to merge 1 commit into from

Conversation

KKvladys
Copy link

@KKvladys KKvladys commented Jan 9, 2025

image

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 using asyncio! 🎉 Your code meets the task requirements and constraints effectively. The use of asyncio.gather and the implementation of run_parallel and run_sequence methods are well done. Just a small note: make sure to restructure the wake_up_program and sleep_program using these methods to maintain the logical execution order as intended. Keep up the great work! 🚀

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

Comment on lines +38 to +39
await (service.run_parallel(*wake_up_program))
await (service.run_sequence(*sleep_program))

Choose a reason for hiding this comment

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

The wake_up_program and sleep_program should be restructured using run_sequence and run_parallel to ensure logical execution order. For example, ensure that operations like 'switch on' happen before 'play', and 'flush' before 'clean'. This will maintain the logical flow while still leveraging asynchronous execution for performance gains.

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