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

Service setting can be received for a project #123

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions ayon_api/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,15 @@ def get_service_name():
return ServiceContext.service_name


def get_service_addon_settings():
def get_service_addon_settings(project_name=None):
"""Addon settings of service which initialized service.

Service context must be initialized to be able to use this function. Call
'init_service' on you service start to do so.

Args:
project_name (Optional[str]): Project name.

Returns:
Dict[str, Any]: Addon settings.

Expand All @@ -252,7 +255,9 @@ def get_service_addon_settings():
addon_version = get_service_addon_version()
if addon_name is None or addon_version is None:
raise ValueError("Service is not initialized")
return get_addon_settings(addon_name, addon_version)
return get_addon_settings(
addon_name, addon_version, project_name=project_name
)


def is_connection_created():
Expand Down