mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
idle manager is always enabled and starts thread only if has registered callbacks
This commit is contained in:
parent
69ce0a8194
commit
864e8b882c
1 changed files with 3 additions and 3 deletions
|
|
@ -40,8 +40,7 @@ class IdleManager(PypeModule, ITrayService):
|
|||
name = "idle_manager"
|
||||
|
||||
def initialize(self, module_settings):
|
||||
idle_man_settings = module_settings[self.name]
|
||||
self.enabled = idle_man_settings["enabled"]
|
||||
self.enabled = True
|
||||
|
||||
self.time_callbacks = collections.defaultdict(list)
|
||||
self.idle_thread = None
|
||||
|
|
@ -50,7 +49,8 @@ class IdleManager(PypeModule, ITrayService):
|
|||
return
|
||||
|
||||
def tray_start(self):
|
||||
self.start_thread()
|
||||
if self.time_callbacks:
|
||||
self.start_thread()
|
||||
|
||||
def tray_exit(self):
|
||||
self.stop_thread()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue