mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 22:02:15 +01:00
ftrack's post launch hook do not trigger start.timer action but trigger start of the timer on it's own
This commit is contained in:
parent
3674bc8f94
commit
dc33f3d842
1 changed files with 7 additions and 19 deletions
|
|
@ -176,22 +176,10 @@ class PostFtrackHook(PostLaunchHook):
|
|||
)
|
||||
return
|
||||
|
||||
source = {
|
||||
"user": {
|
||||
"id": user_entity["id"],
|
||||
"username": user_entity["username"]
|
||||
}
|
||||
}
|
||||
event_data = {
|
||||
"actionIdentifier": "start.timer",
|
||||
"selection": [{"entityId": entity["id"], "entityType": "task"}]
|
||||
}
|
||||
session.event_hub.publish(
|
||||
_ftrack_api.event.base.Event(
|
||||
topic="ftrack.action.launch",
|
||||
data=event_data,
|
||||
source=source
|
||||
),
|
||||
on_error="ignore"
|
||||
)
|
||||
self.log.debug("Timer start triggered successfully.")
|
||||
try:
|
||||
user_entity.start_timer(entity, force=True)
|
||||
session.commit()
|
||||
self.log.debug("Timer start triggered successfully.")
|
||||
|
||||
except Exception:
|
||||
self.log.warning("Couldn't trigger Ftrack timer.", exc_info=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue