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

Auto-flush TagUI processes, eg Ctrl+C is used or forget to close() [done] #18

Closed
kensoh opened this issue Jun 27, 2019 · 4 comments
Closed
Labels

Comments

@kensoh
Copy link
Member

kensoh commented Jun 27, 2019

It is possible that TagUI processes (main TagUI, integration background processes - SikuliX, Chrome, Chrome browser) are not exited cleanly under certain conditions. For eg, if user Ctrl+C to kill a TagUI for Python script, or if user forgets to use close() to gracefully close off the running processes.

These dead processes have insignificant impact to TagUI for Python functionality. However they can cause unnecessary drain on battery and CPU cycles. Raising this issue to make a commit that runs a TagUI script that flush all TagUI-related processes.

This will be run within init() so that an accidental Ctrl+C or forgetting to close() allows immediate resumption of use by relaunching Jupyter notebook or Python interactive shell or Python script, and using init(). Placing within close() is meaningless for the scenarios where dead processes happen.

@kensoh kensoh changed the title Auto-cleaning dead TagUI processes, eg if ctrl+c was used or forget to close() Auto-flush dead TagUI processes, eg if ctrl+c is used or forget to close() Jun 27, 2019
@kensoh kensoh added the feature label Jun 27, 2019
kensoh added a commit that referenced this issue Jun 27, 2019
It is possible that TagUI processes (main TagUI, integration background processes - SikuliX, Chrome, Chrome browser) are not exited cleanly under certain conditions. For eg, if user Ctrl+C to kill a TagUI for Python script, or if user forgets to use close() to gracefully close off the running processes.

These dead processes have insignificant impact to TagUI for Python functionality. However they can cause unnecessary drain on battery and CPU cycles. Raising this issue to make a commit that runs a TagUI script that flush all TagUI-related processes.

This will be run within init() so that an accidental Ctrl+C or forgetting to close() allows immediate resumption of use by relaunching Jupyter notebook or Python interactive shell or Python script, and using init(). Placing within close() is meaningless for the scenarios where dead processes happen.
@kensoh kensoh changed the title Auto-flush dead TagUI processes, eg if ctrl+c is used or forget to close() Auto-flush dead TagUI processes, eg if ctrl+c is used or forget to close() [done] Jun 27, 2019
@kensoh kensoh changed the title Auto-flush dead TagUI processes, eg if ctrl+c is used or forget to close() [done] Autoflush dead TagUI processes, eg ctrl+c is used or forget to close() [done] Jun 27, 2019
@kensoh kensoh changed the title Autoflush dead TagUI processes, eg ctrl+c is used or forget to close() [done] Autoflush TagUI processes, eg ctrl+c is used or forget to close() [done] Jun 27, 2019
@kensoh
Copy link
Member Author

kensoh commented Jun 27, 2019

Deployed as v1.6. To use, pip install tagui --upgrade

@kensoh
Copy link
Member Author

kensoh commented Jun 27, 2019

Bumped with an update and deployed as v1.6.1. To use, pip install tagui --upgrade

@kensoh
Copy link
Member Author

kensoh commented Jun 28, 2019

The upstream script in TagUI project has been iterated a few times and committed, but this sort of script wanting to work across all OSes on an intimate level may encounter edge cases along the way.

Adding a remark that will just have to add on along the way to make edge cases work. And linking to the upstream issue for context and details of the motivation for coming up with this script -

aisingapore/TagUI#466

@kensoh
Copy link
Member Author

kensoh commented Jun 28, 2019

Bumped with an update and deployed as v1.6.2. To use, pip install tagui --upgrade

(removed warning message for Linux OS, script updated from ps -x to ps x)

@kensoh kensoh changed the title Autoflush TagUI processes, eg ctrl+c is used or forget to close() [done] Autoflush TagUI processes, eg Ctrl+C is used or forget to close() [done] Jun 28, 2019
@kensoh kensoh changed the title Autoflush TagUI processes, eg Ctrl+C is used or forget to close() [done] Auto-flush TagUI processes, eg Ctrl+C is used or forget to close() [done] Jun 28, 2019
@kensoh kensoh closed this as completed Jul 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant