-
Notifications
You must be signed in to change notification settings - Fork 37
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
Tray: Add username to info #797
Conversation
Would love to test - but how do I "get" this tray info? How do I request it? Do you have an example for dummies? |
Oh, when you start a tray, you can open Admin > Console and do import json
import requests
from ayon_core.tools.tray import get_tray_server_url
response = requests.get(f"{get_tray_server_url()}/tray")
print(json.dumps(response.json(), indent=4)) |
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.
Works for me.
{
"username": "admin",
"bundle": "2024.01.0-full-2024-01-17-02-roydev",
"dev_mode": true,
"staging_mode": false,
"addons": {
"applications": "0.2.5-dev.1",
"ayon_ocio": "1.1.1",
"ayon_third_party": "1.1.1",
"blender": "0.2.2-dev.1",
"colorbleed": "0.0.6",
"deadline": "0.2.5-dev.1",
"fusion": "0.2.1-dev.1",
"houdini": "0.3.10-dev.1",
"launch_scripts": "0.1.0",
"maya": "0.2.10-dev.1",
"resolve": "0.2.3-dev.1",
"substancepainter": "0.2.2-dev.1",
"traypublisher": "0.2.6-dev.1",
"launcher_tool": "1.0.0",
"loader_tool": "1.0.0",
"python_interpreter": "1.0.0"
},
"installer_version": "1.0.3",
"running_time": 24.249284029006958
}
By the way, also works when running the code not from console in tray but e.g. from a DCC (to showcase the point that it does get it via the request) |
Changelog Description
Tray info received with
/tray
endpoint does return username.Additional info
Username will be important check for running webactions, which can be available from the start of tray process. Cache the username as user change requires restart.
Testing notes:
"username"
is there.