mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge branch 'develop' into enhancement/add-username-to-tray-info
This commit is contained in:
commit
6cd69e6126
1 changed files with 11 additions and 1 deletions
|
|
@ -124,6 +124,11 @@ def _wait_for_starting_tray(
|
|||
if data.get("started") is True:
|
||||
return data
|
||||
|
||||
pid = data.get("pid")
|
||||
if pid and not _is_process_running(pid):
|
||||
remove_tray_server_url()
|
||||
return None
|
||||
|
||||
if time.time() - started_at > timeout:
|
||||
return None
|
||||
time.sleep(0.1)
|
||||
|
|
@ -276,7 +281,12 @@ def remove_tray_server_url(force: Optional[bool] = False):
|
|||
except BaseException:
|
||||
data = {}
|
||||
|
||||
if force or not data or data.get("pid") == os.getpid():
|
||||
if (
|
||||
force
|
||||
or not data
|
||||
or data.get("pid") == os.getpid()
|
||||
or not _is_process_running(data.get("pid"))
|
||||
):
|
||||
os.remove(filepath)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue