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

Allow using scheduler as a context manager #154

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

Conversation

ZhukovAlexander
Copy link
Contributor

This will make the code more pythonic. This also open up an opportunity to allow users to use low-level APIs.

return self
except ValueError: # assume register_birth failed
self.log.info('Waiting for registering birth...')
time.sleep(self._interval)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should let this exception be raised and let the user handle it. I'm not comfortable with implicitly calling sleep() which will block code execution.

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.

2 participants