Hi everyone,
I have an event listener running on my machine. Some action events trigger some python code running locally. I wanted to send a notification on ftrack after launching an action to say that the event was correctly received and was treated.
I tried to publish an event with the topic ftrack.action.trigger-user-interface. The event is sent but doesn't seem to be received. Is my code wrong, or this event can only be published inside an action and not remotely ?
def action_rooting(event):
user_id = event['source']['user']['id']
triggerInterface = ftrack_api.event.base.Event(topic='ftrack.action.trigger-user-interface',
data=dict(type='message', success=True, message='test message'),
target='applicationId=ftrack.client.web and user.id="{0}"'.format(user_id))
sessionFT.event_hub.publish(triggerInterface, on_error='raise')
sessionFT.event_hub.subscribe('topic=ftrack.action.launch', action_rooting)
sessionFT.event_hub.wait()