Skip to content

WIP Backlog/framework loader #540

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

Open
wants to merge 188 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
188 commits
Select commit Hold shift + click to select a range
8c42aaa
remove framework-widget
lluisCM Feb 7, 2024
d6233a9
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Feb 7, 2024
d4f8153
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Feb 7, 2024
5a9acf3
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Feb 7, 2024
2a04cd7
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Feb 8, 2024
6fc405f
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Feb 8, 2024
90ab95e
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Feb 8, 2024
3849d82
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Feb 8, 2024
599b789
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Feb 12, 2024
3f25798
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Feb 12, 2024
95a0677
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Feb 12, 2024
19f54de
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Feb 12, 2024
398bd41
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Feb 12, 2024
f760b3e
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Feb 12, 2024
f4b9e97
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Feb 12, 2024
b1d7554
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Feb 12, 2024
e132d07
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Feb 12, 2024
5477ad1
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Feb 13, 2024
4b1a74f
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Feb 14, 2024
b84d398
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Feb 16, 2024
cbd2c2c
update date on publisher widget and timetracker widget
lluisCM Feb 16, 2024
1f48ab1
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Feb 16, 2024
e3132db
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Feb 20, 2024
bc67e17
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Feb 21, 2024
391cde7
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Feb 23, 2024
8e19633
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Feb 26, 2024
acbfd19
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Feb 26, 2024
1a6ea94
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Feb 26, 2024
6a86252
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Feb 27, 2024
1122fea
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 8, 2024
08ba490
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 8, 2024
4a7e8e1
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 8, 2024
88ec7a4
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 8, 2024
b06af7f
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 8, 2024
fc7a97a
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 11, 2024
51910e9
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 11, 2024
8b89581
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 11, 2024
d585549
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 12, 2024
64f2fae
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 13, 2024
cab8fc8
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 14, 2024
31af13f
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 14, 2024
3e3b94c
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 14, 2024
cc5bc48
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 15, 2024
ce76c12
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 15, 2024
4971d86
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 15, 2024
e43a837
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 15, 2024
7880e5a
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 20, 2024
f2126cd
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 21, 2024
2ea0840
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 22, 2024
800cf67
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 25, 2024
2ccdea9
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 25, 2024
161a28f
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 25, 2024
3b45d10
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 25, 2024
1c6dc9e
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 25, 2024
d86b8eb
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 25, 2024
716cefd
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 25, 2024
dad7f7f
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 26, 2024
a193ae6
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 26, 2024
b11e6fc
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 26, 2024
53c6978
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 27, 2024
0da980d
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 27, 2024
9fcf879
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Mar 27, 2024
9d1c194
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Apr 2, 2024
828ec82
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Apr 2, 2024
9ba34ac
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Apr 2, 2024
8fdca98
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Apr 15, 2024
bcd4524
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Apr 15, 2024
aedffe6
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Apr 17, 2024
629803e
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Apr 18, 2024
9f7edb7
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Apr 19, 2024
1c0abd9
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Apr 19, 2024
7913ca8
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Apr 22, 2024
f1cd994
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Apr 22, 2024
c4694bd
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Apr 24, 2024
0111334
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM May 2, 2024
f12b4a0
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM May 2, 2024
a98cf5d
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM May 2, 2024
d6b48aa
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM May 2, 2024
a693cad
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM May 3, 2024
2d5365d
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM May 3, 2024
f551eb7
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM May 7, 2024
e19fabe
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM May 7, 2024
dd0bc2e
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM May 8, 2024
22eaa3c
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM May 13, 2024
9e7fdf3
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM May 13, 2024
96fc21a
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM May 13, 2024
3779b60
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM May 14, 2024
f8a85c4
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM May 14, 2024
fb5d9a6
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM May 15, 2024
c0c3339
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM May 21, 2024
e5be1a4
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM May 21, 2024
99df474
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM May 21, 2024
cf77283
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM May 27, 2024
ea4b2b8
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM May 28, 2024
29a64b3
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM May 31, 2024
a534ff0
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Jun 4, 2024
e56972a
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Jun 4, 2024
6f4d2e7
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Jun 4, 2024
62abdea
launch action should work WIP
lluisCM Jun 10, 2024
3cb40dc
WIP
lluisCM Jun 10, 2024
184a002
WIP
lluisCM Jun 10, 2024
15c5464
WIP
lluisCM Jun 10, 2024
63dd31c
WIP
lluisCM Jun 11, 2024
ebc651c
WIP pass user optiosn
lluisCM Jun 11, 2024
1ddd848
run on mian thread decorator on client and host
lluisCM Jun 11, 2024
b6687c0
Merge branch 'main' of github.com:ftrackhq/integrations into backlog/…
lluisCM Jun 11, 2024
c1bdc45
action true working
lluisCM Jun 11, 2024
c2f773f
fix dict init
lluisCM Jun 11, 2024
5e16557
session identifier implemented
lluisCM Jun 11, 2024
60d0617
improve run_in_main_thread_decorator
lluisCM Jun 12, 2024
d74f019
move run_tool startup and action logic back to the dcc and separate r…
lluisCM Jun 12, 2024
052d7a4
implement remote event manager
lluisCM Jun 14, 2024
faa41a4
add loader capabilities to maya
lluisCM Jun 18, 2024
721bb3c
feat: Backlog/framework loader henrik (#530)
henriknorin-ftrack Jun 18, 2024
53996c4
Merge branch 'backlog/framework-loader' of github.com:ftrackhq/integr…
lluisCM Jun 18, 2024
3528b00
add release notes
lluisCM Jun 18, 2024
4e17d7d
WIP
lluisCM Jun 18, 2024
9ba1bb3
add event blocker to avoid unexpected crashes
lluisCM Jun 21, 2024
1ca36c9
fix maya typo
lluisCM Jun 21, 2024
a0150ac
fix error
lluisCM Jun 21, 2024
bd9504e
Merge branch 'backlog/framework-maya-loader' of github.com:ftrackhq/i…
lluisCM Jun 21, 2024
c8d9961
backlog/event-blocker-on-base-dialog
lluisCM Jun 21, 2024
3e9943a
loader working
lluisCM Jun 21, 2024
000fb13
Merge branch 'backlog/framework-maya-loader' of github.com:ftrackhq/i…
lluisCM Jun 21, 2024
0ff4933
Merge branch 'backlog/event-blocker-on-base-dialog' of https://github…
henriknorin-ftrack Jun 24, 2024
c75d917
fix: Backlog/fix dialog bug if no tool config (#531)
henriknorin-ftrack Jun 25, 2024
f26a905
feat: Backlog/framework maya loader (#535)
lluisCM Jun 25, 2024
4be050d
fix: Add missing Nuke loaders (#536)
henriknorin-ftrack Jun 25, 2024
c0e9c39
Merge branch 'main' into backlog/framework-loader
henriknorin-ftrack Jun 25, 2024
f5c0942
Merged remote 'backlog/framework-loader' into 'backlog/framework-loader'
henriknorin-ftrack Jun 25, 2024
34bd2d3
fix optional run in main thread
lluisCM Jun 25, 2024
ecd44de
feat: Backlog/framework loader photoshop (#533)
henriknorin-ftrack Jun 25, 2024
4101fc1
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Jun 26, 2024
a3f5354
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Jun 26, 2024
787a383
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Jun 26, 2024
2913b66
feat: Backlog/framework loader premiere (#537)
henriknorin-ftrack Jun 26, 2024
f13a81f
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Jul 5, 2024
88fc8d4
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Jul 11, 2024
4d1e6df
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Jul 11, 2024
90a6824
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Jul 11, 2024
5de9376
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Jul 11, 2024
9162a5a
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Jul 11, 2024
091a694
align with main
lluisCM Jul 12, 2024
3d5b6ba
run in main thread decorator added
lluisCM Jul 12, 2024
638a27f
add houdini change
lluisCM Jul 12, 2024
95db3fc
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Jul 12, 2024
4dc4e3a
align with main
lluisCM Jul 12, 2024
8788d36
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Jul 12, 2024
905d5ba
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Jul 12, 2024
26c3ae0
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Jul 12, 2024
d3ce5af
align with main
lluisCM Jul 12, 2024
4c297e6
align with main
lluisCM Jul 12, 2024
e4c33c3
add standalone run in main thread changes
lluisCM Jul 12, 2024
bc78b41
remove dcc modifications
lluisCM Jul 12, 2024
81f06d1
remove unvalid changes
lluisCM Jul 12, 2024
d0d7d2b
Update projects/framework-common-extensions/plugins/resolve_entity_pa…
lluisCM Jul 12, 2024
2f3e5c4
Update projects/framework-common-extensions/plugins/resolve_entity_pa…
lluisCM Jul 12, 2024
da8d618
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Jul 17, 2024
d9ffbdd
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Jul 17, 2024
9c16498
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Jul 18, 2024
f857871
assuming session is already remote
lluisCM Jul 18, 2024
2736451
clean up duplicated line
lluisCM Jul 18, 2024
62fe2f4
remove event manager disconnect methods
lluisCM Jul 18, 2024
2fb8239
add comment
lluisCM Jul 18, 2024
e8562f4
remove unused resolve-entity-path plugin
lluisCM Jul 18, 2024
5ce0cb2
add back the resolve entity path
lluisCM Jul 18, 2024
cbe32d7
add action discover and action launch topics on constants
lluisCM Jul 18, 2024
707645d
use clique to resolve sequences
lluisCM Jul 18, 2024
417db4f
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Jul 22, 2024
315da84
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Jul 23, 2024
9bdc6fc
align to main
lluisCM Jul 23, 2024
006d779
move action event topics out of framework folder
lluisCM Jul 23, 2024
e829b12
remove register actions from client
lluisCM Jul 23, 2024
95bb08f
add actions callbck to client
lluisCM Jul 23, 2024
536e6dc
fix remote_actions
lluisCM Jul 23, 2024
51bbebf
using EVENTHUBTHREAD util for registering remote action
lluisCM Jul 23, 2024
9d200b1
align with main
lluisCM Jul 23, 2024
0bc2f04
Remove action subscription from event manager
lluisCM Jul 23, 2024
c756a93
Merge branch 'main' of github.com:ftrackhq/integrations
lluisCM Jul 24, 2024
3ba3f90
changed core utils and all projects and release notes
lluisCM Jul 24, 2024
c77a459
add missing functions in the init
lluisCM Jul 24, 2024
052215c
align with backlog/create_api_session_util
lluisCM Jul 24, 2024
a6f6c7f
update register_remote_action to not check eventhubthread neither con…
lluisCM Jul 24, 2024
f014b8e
feat: Backlog/framework loader maya (#558)
lluisCM Jul 24, 2024
0cd9bcd
align with main
lluisCM Jul 25, 2024
54c71b5
Merge branch 'backlog/framework-loader' of github.com:ftrackhq/integr…
lluisCM Jul 25, 2024
9ef02c8
align with main
lluisCM Jul 25, 2024
dbf4897
remove exclamation mark from logs
lluisCM Jul 25, 2024
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
5 changes: 5 additions & 0 deletions libs/constants/release_notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# ftrack Constants library release Notes

## upcoming

* [new] framework/event; FTRACK_ACTION_DISCOVER_TOPIC and FTRACK_ACTION_LAUNCH_TOPIC added.


## v2.0.0
2024-02-12

Expand Down
6 changes: 6 additions & 0 deletions libs/constants/source/ftrack_constants/event/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# :coding: utf-8
# :copyright: Copyright (c) 2024 ftrack

#: Ftrack general events
FTRACK_ACTION_DISCOVER_TOPIC = 'ftrack.action.discover'
FTRACK_ACTION_LAUNCH_TOPIC = 'ftrack.action.launch'
2 changes: 2 additions & 0 deletions libs/framework-core/release_notes.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# ftrack Framework Core library release Notes


## upcoming

* [new] Client; Discover and launch action overrides.
* [changed] Host; Remove with_new_session decorator and use current remote session directly.
* [changed] EventManager; Remove the ability to connect to the event hub, instead assume that passed session argument is already connected.
* [changed] EventManager; EventHubThread moved to ftrack_utils.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,53 @@ def reset_all_tool_configs(self):
'''
self.host_connection.reset_all_tool_configs()

@delegate_to_main_thread_wrapper
def on_discover_action_callback(
self,
action_name,
label,
dialog_name,
options,
session_identifier_func,
event,
):
'''Discover *event*.'''
if session_identifier_func:
session_id = session_identifier_func()
label = label + " @" + session_id
selection = event['data'].get('selection', [])
if len(selection) == 1 and selection[0]['entityType'] == 'Component':
return {
'items': [
{
'action_name': action_name,
'label': label,
'subscriber_id': self.id,
'dialog_name': dialog_name,
'options': options,
}
]
}

@delegate_to_main_thread_wrapper
def on_launch_action_callback(self, event):
'''Handle *event*.

event['data'] should contain:

*applicationIdentifier* to identify which application to start.

'''
selection = event['data']['selection']

action_name = event['data']['action_name']
label = event['data']['label']
dialog_name = event['data']['dialog_name']
options = event['data']['options']
options['event_data'] = {'selection': selection}

self.run_tool(action_name, dialog_name, options)

@track_framework_usage(
'FRAMEWORK_RUN_TOOL',
{'module': 'client'},
Expand Down Expand Up @@ -573,3 +620,7 @@ def verify_plugins(self, plugin_names):
self.host_id, plugin_names
)[0]
return unregistered_plugins

def close(self):
self.logger.debug('Shutting down client')
# TODO: try self.event_manager.close() if needed and see if it works.
1 change: 1 addition & 0 deletions libs/utils/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

## upcoming

* [new] Actions, remote_actions; Add support to register remote actions.
* [new] Session, ftrack_api_session; Added create_api_session utility to create the api session with an EventHubThread in case of auto_connect_event_hub is True.
* [new] Dependency; Added dependency on ftrack-python-api.
* [new] event_hub event_hub_thread; Added EventHubThread utility.
Expand Down
7 changes: 7 additions & 0 deletions libs/utils/source/ftrack_utils/actions/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# :coding: utf-8
# :copyright: Copyright (c) 2024 ftrack

from ftrack_utils.actions.remote_actions import (
default_discover_action_callback,
register_remote_action,
)
76 changes: 76 additions & 0 deletions libs/utils/source/ftrack_utils/actions/remote_actions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# :coding: utf-8
# :copyright: Copyright (c) 2024 ftrack

import logging
import threading
from functools import partial

from ftrack_constants.event import (
FTRACK_ACTION_DISCOVER_TOPIC,
FTRACK_ACTION_LAUNCH_TOPIC,
)

logger = logging.getLogger('ftrack_utils:actions:remote_actions')


def default_discover_action_callback(action_name, label, subscriber_id, event):
'''Discover *event*.'''
return {
'items': [
{
'action_name': action_name,
'label': label,
'subscriber_id': subscriber_id,
}
]
}


def register_remote_action(
session,
action_name,
label,
subscriber_id,
launch_callback,
discover_callback=None,
):
"""
Register a remote action with the given name and callbacks.

Parameters:
session (ftrack_api.Session): The session to use.
action_name (str): The name of the action.
discover_callback (callable): The callback to use for discovery.
launch_callback (callable): The callback to use for launching.
subscriber_id (str, optional): The subscriber id to use.

Returns:
None
"""
# Check if session is connected to event hub
if not session.event_hub.connected:
logger.error(
'Session event hub is not connected.Please make sure to connect the event hub before registring remote actions. Example: session.event_hub.connect()'
)
return

# Use the default discover callback if not provided
if not discover_callback:
discover_callback = partial(
default_discover_action_callback, action_name, label, subscriber_id
)

# Subscribe to the discover event
discover_event_topic = f'{FTRACK_ACTION_DISCOVER_TOPIC} and source.user.username={session.api_user}'
discover_subscribe_id = session.event_hub.subscribe(
'topic={}'.format(discover_event_topic), discover_callback
)

# Subscribe to the launch event
launch_event_topic = f'{FTRACK_ACTION_LAUNCH_TOPIC} and data.action_name={action_name} and source.user.username={session.api_user} and data.subscriber_id={subscriber_id}'
launch_subscribe_id = session.event_hub.subscribe(
'topic={}'.format(launch_event_topic), launch_callback
)

# Return discover and launch subscription ids.
return discover_subscribe_id, launch_subscribe_id
Loading
Loading