-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add supervisor function to poll autoreload status #5352
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
Conversation
In your code, do you not know if |
So the code I'm using launches different apps depending on what keys are held down at boot so at any given time on code.py entry, auto-reload may or may not be known. Specifically, I wish to toggle autoreload on a button press which requires knowledge of the current status to call the correct function. I thought of creating a toggle function instead, but as long as I can determine the current status it's trivial to call the correct function. |
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.
Thanks for the PR @mscreations. I have one suggestion, I think it might be better if autoreload_enabled
is done as a property.
We don't have module properties, so it would need to be moved to |
You may be able to use sleep memory to store state across the runs of different programs. |
Good point, it can be considered for |
I'm making this change now. (To an |
Done it 5e01500 |
This adds a function to supervisor to check what the current autoreload status is from code.py.