mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
Merged in bugfix/ftrack_minor_importance (pull request #459)
Bugfix/ftrack minor importance Approved-by: Milan Kolar <milan@orbi.tools>
This commit is contained in:
commit
73618f4523
3 changed files with 21 additions and 8 deletions
|
|
@ -31,7 +31,7 @@ class SyncToAvalonEvent(BaseEvent):
|
|||
"timelog", "auth_userrole", "appointment"
|
||||
]
|
||||
ignore_ent_types = ["Milestone"]
|
||||
ignore_keys = ["statusid"]
|
||||
ignore_keys = ["statusid", "thumbid"]
|
||||
|
||||
project_query = (
|
||||
"select full_name, name, custom_attributes"
|
||||
|
|
@ -486,6 +486,14 @@ class SyncToAvalonEvent(BaseEvent):
|
|||
|
||||
action = ent_info["action"]
|
||||
ftrack_id = ent_info["entityId"]
|
||||
if isinstance(ftrack_id, list):
|
||||
self.log.warning((
|
||||
"BUG REPORT: Entity info has `entityId` as `list` \"{}\""
|
||||
).format(ent_info))
|
||||
if len(ftrack_id) == 0:
|
||||
continue
|
||||
ftrack_id = ftrack_id[0]
|
||||
|
||||
if action == "move":
|
||||
ent_keys = ent_info["keys"]
|
||||
# Seprate update info from move action
|
||||
|
|
@ -1820,6 +1828,13 @@ class SyncToAvalonEvent(BaseEvent):
|
|||
obj_type_id = ent_info["objectTypeId"]
|
||||
ent_cust_attrs = cust_attrs_by_obj_id.get(obj_type_id)
|
||||
|
||||
if ent_cust_attrs is None:
|
||||
self.log.warning((
|
||||
"BUG REPORT: Entity has ent type without"
|
||||
" custom attributes <{}> \"{}\""
|
||||
).format(entType, ent_info))
|
||||
continue
|
||||
|
||||
for key, values in ent_info["changes"].items():
|
||||
if key in hier_attrs_keys:
|
||||
self.hier_cust_attrs_changes[key].append(ftrack_id)
|
||||
|
|
|
|||
|
|
@ -53,8 +53,7 @@ class SocketThread(threading.Thread):
|
|||
)
|
||||
|
||||
self.subproc = subprocess.Popen(
|
||||
[sys.executable, self.filepath, "-port", str(self.port)],
|
||||
stdout=subprocess.PIPE
|
||||
[sys.executable, self.filepath, "-port", str(self.port)]
|
||||
)
|
||||
|
||||
# Listen for incoming connections
|
||||
|
|
@ -116,11 +115,6 @@ class SocketThread(threading.Thread):
|
|||
if self.subproc.poll() is None:
|
||||
self.subproc.terminate()
|
||||
|
||||
lines = self.subproc.stdout.readlines()
|
||||
if lines:
|
||||
print("*** Socked Thread stdout ***")
|
||||
for line in lines:
|
||||
os.write(1, line)
|
||||
self.finished = True
|
||||
|
||||
def get_data_from_con(self, connection):
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ import sys
|
|||
import signal
|
||||
import socket
|
||||
|
||||
import traceback
|
||||
|
||||
from ftrack_server import FtrackServer
|
||||
from pype.ftrack.ftrack_server.lib import SocketSession, UserEventHub
|
||||
|
||||
|
|
@ -31,6 +33,8 @@ def main(args):
|
|||
server = FtrackServer("action")
|
||||
log.debug("Launched User Ftrack Server")
|
||||
server.run_server(session=session)
|
||||
except Exception:
|
||||
traceback.print_exception(*sys.exc_info())
|
||||
|
||||
finally:
|
||||
log.debug("Closing socket")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue