Skip to content

Conversation

@antirotor
Copy link
Member

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-cli process 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.

@antirotor antirotor requested a review from iLLiCiTiT November 10, 2025 16:41
@antirotor antirotor self-assigned this Nov 10, 2025
@antirotor antirotor added the type: enhancement Improvement of existing functionality or minor addition label Nov 10, 2025
@ynbot ynbot added the size/XS label Nov 10, 2025
Comment on lines +62 to +64

ctx.params.pop("project")
ctx.forward(tray)
Copy link
Member

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.

Suggested change
ctx.params.pop("project")
ctx.forward(tray)
else:
ctx.params.pop("project")
ctx.forward(tray)

Copy link
Member Author

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()?

@ynbot ynbot moved this to Review In Progress in PR reviewing Nov 11, 2025

_cleanup_project_args()

app_addon = addons_manager.get_enabled_addon("applications")
Copy link
Member

@iLLiCiTiT iLLiCiTiT Nov 11, 2025

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.

Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS type: enhancement Improvement of existing functionality or minor addition

Projects

Status: Review In Progress

Development

Successfully merging this pull request may close these issues.

4 participants