-
Notifications
You must be signed in to change notification settings - Fork 67
Experimental: Track CLI processes using Process Manager #1540
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
base: develop
Are you sure you want to change the base?
Conversation
|
|
||
| ctx.params.pop("project") | ||
| ctx.forward(tray) |
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.
We should not start tray in headless mode.
| ctx.params.pop("project") | |
| ctx.forward(tray) | |
| else: | |
| ctx.params.pop("project") | |
| ctx.forward(tray) |
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.
if I read this code right - the whole original chunk of code is:
if os.getenv("AYON_HEADLESS_MODE") == "1":
print(ctx.get_help())
sys.exit(0)
else:
ctx.params.pop("project")
ctx.forward(tray)you don't need else because of sys.exit()?
|
|
||
| _cleanup_project_args() | ||
|
|
||
| app_addon = addons_manager.get_enabled_addon("applications") |
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.
Do you realize that this cli is also used for small subprocesses like extract burnin, ffmpeg user service ocio functionality etc? Some of them are already outputing to parent process. On windows it also doesn't make sense to read output if stdout/stderr is not available at all (is set to None).
I don't think we should do it automatically for all processes TBH. It should be explicit and not enabled by default. Have one function in ayon-core to store the process info that can be easily called.
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.
With that function we should move that logic to ayon-core.
Changelog Description
Adds ability to track AYON itself as process in Process Manager.
Additional info
Process Manager is a tool in ayon-applications to track launched processes. This PR is using that tool to track AYON processes too.
Warning
This is experimental and proof-of-concept. Not to be merged in this form
Testing notes:
This requires ayon-applications addon 1.2.4 and higher.
When you run AYON, you should see
ayon-cliprocess in the Process Manager window with output - the same as with DCCs. You can run Publisher, or other tools - they well create new ayon-cli process. Even launching apps will create it (with the output from pre-launch hooks).While this might be useful, it is also very verbose, so without auto-clean function it is probably unusable.
Also there is some bug regarding colors in the output.