mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
moved the launch hook into timers manager
This commit is contained in:
parent
f4aa2d17b2
commit
d4112eb3fa
2 changed files with 12 additions and 5 deletions
|
|
@ -1,6 +1,3 @@
|
|||
import os
|
||||
|
||||
from openpype.api import get_project_settings
|
||||
from openpype.lib import PostLaunchHook
|
||||
|
||||
|
||||
|
|
@ -1,7 +1,10 @@
|
|||
import os
|
||||
import platform
|
||||
from openpype.modules import OpenPypeModule
|
||||
from openpype_interfaces import ITrayService
|
||||
from openpype_interfaces import (
|
||||
ITrayService,
|
||||
ILaunchHookPaths
|
||||
)
|
||||
from avalon.api import AvalonMongoDB
|
||||
|
||||
|
||||
|
|
@ -64,7 +67,7 @@ class ExampleTimersManagerConnector:
|
|||
self._timers_manager_module.timer_stopped(self._module.id)
|
||||
|
||||
|
||||
class TimersManager(OpenPypeModule, ITrayService):
|
||||
class TimersManager(OpenPypeModule, ITrayService, ILaunchHookPaths):
|
||||
""" Handles about Timers.
|
||||
|
||||
Should be able to start/stop all timers at once.
|
||||
|
|
@ -167,6 +170,13 @@ class TimersManager(OpenPypeModule, ITrayService):
|
|||
project_name, asset_name, task_name
|
||||
)
|
||||
|
||||
def get_launch_hook_paths(self):
|
||||
"""Implementation of `ILaunchHookPaths`."""
|
||||
return os.path.join(
|
||||
os.path.dirname(os.path.abspath(__file__)),
|
||||
"launch_hooks"
|
||||
)
|
||||
|
||||
def get_timer_data_for_context(self, project_name, asset_name, task_name):
|
||||
"""Prepare data for timer related callbacks.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue