Skip to content

Commit

Permalink
SHOT-4407: Improve Alias start up (#205)
Browse files Browse the repository at this point in the history
* Increase client time out.
* Handle any server Qt error.
* Update docs
* Bump tk-framework-alias version dependency
  • Loading branch information
staceyoue authored Dec 6, 2024
1 parent 34af208 commit 7e809f4
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 5 deletions.
4 changes: 3 additions & 1 deletion docs/changes.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
What's New
####################################################

The latest version of the Alias Engine is ``v4.1.1``.
The latest version of the Alias Engine is ``v4.1.2``.

.. include:: v4.1.2.rst

.. include:: v4.1.1.rst

Expand Down
9 changes: 9 additions & 0 deletions docs/v4.1.2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
v4.1.2
=====================

Release highlights
------------------

* Improve error handling on Alias start up
* Improve Alias API timeout handling

4 changes: 3 additions & 1 deletion engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,9 @@ def __setup_sio(self, hostname, port, namespace):
"""

# Create and connect to the server to communicate with Alias
self.__sio = self._tk_alias.ShotGridAliasSocketIoClient(self, namespace)
self.__sio = self._tk_alias.ShotGridAliasSocketIoClient(
self, namespace, timeout=60 * 3
)

if not self.__sio:
raise Exception("Failed to create socketio client")
Expand Down
2 changes: 1 addition & 1 deletion info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,5 @@ requires_core_version: "v0.19.18"

frameworks:
- {"name": "tk-framework-aliastranslations", "version": "v0.x.x", "minimum_version": "v0.2.3"}
- {"name": "tk-framework-alias", "version": "v2.x.x", "minimum_version": "v2.0.0"}
- {"name": "tk-framework-alias", "version": "v2.x.x", "minimum_version": "v2.1.1"}
- {"name": "tk-framework-lmv", "version": "v1.x.x"}
2 changes: 2 additions & 0 deletions python/tk_alias/framework_alias.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@
AliasClientModuleProxyWrapper = tk_framework_alias.client.AliasClientModuleProxyWrapper

QtImportError = tk_framework_alias.server.utils.exceptions.QtImportError
QtModuleNotFound = tk_framework_alias.server.utils.exceptions.QtModuleNotFound
QtAppInstanceNotFound = tk_framework_alias.server.utils.exceptions.QtAppInstanceNotFound
13 changes: 11 additions & 2 deletions python/tk_alias/shotgrid_alias_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
# agreement to the ShotGrid Pipeline Toolkit Source Code License. All rights
# not expressly granted therein are reserved by Autodesk, Inc.

from .framework_alias import AliasSocketIoClient, QtImportError
from .framework_alias import (
AliasSocketIoClient,
QtImportError,
QtModuleNotFound,
QtAppInstanceNotFound,
)
from .shotgrid_alias_client_namespace import ShotGridAliasClientNamespace


Expand Down Expand Up @@ -76,7 +81,11 @@ def _handle_server_error(self, error):

from sgtk.platform.qt import QtGui

if not self.connected or error.__class__.__name__ == QtImportError.__name__:
if not self.connected or error.__class__.__name__ in (
QtImportError.__name__,
QtModuleNotFound.__name__,
QtAppInstanceNotFound.__name__,
):
parent = None
else:
parent = self.engine._get_dialog_parent()
Expand Down

0 comments on commit 7e809f4

Please sign in to comment.