Skip to content
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

Pyra launches multiple OPUS instances #202

Closed
dostuffthatmatters opened this issue Nov 8, 2023 · 0 comments
Closed

Pyra launches multiple OPUS instances #202

dostuffthatmatters opened this issue Nov 8, 2023 · 0 comments
Labels
scope:opus status:implemented has been implemented in some dev branch

Comments

@dostuffthatmatters
Copy link
Member

dostuffthatmatters commented Nov 8, 2023

Problem: The mainloop determines whether OPUS is running by searching for a window OPUS - Operator: {opus_username} (Administrator) - [Display - default.ows]. However, if the window name is slightly different, it doesn't detect it and opens a new OPUS instance.

Solution: Instead of looking for the window, look for processes running opus.exe or OpusCore.exe.

import time
import psutil

t1 = time.time()
for p in psutil.process_iter():
    if p.name() in ["opus.exe", "OpusCore.exe"]:
        print(p)
t2 = time.time()

print("took", t2-t1, "seconds")

Using this snippet, we can reliably find and possibly kill all the necessary processes.

@dostuffthatmatters dostuffthatmatters added status:in-progress is being work on in some dev branch scope:opus labels Nov 8, 2023
@dostuffthatmatters dostuffthatmatters changed the title Multiple OPUS instances are started Pyra launches multiple OPUS instances Nov 8, 2023
@dostuffthatmatters dostuffthatmatters added status:implemented has been implemented in some dev branch and removed status:in-progress is being work on in some dev branch labels Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:opus status:implemented has been implemented in some dev branch
Projects
None yet
Development

No branches or pull requests

1 participant