Skip to content

Commit

Permalink
#155 comment out changes for now
Browse files Browse the repository at this point in the history
  • Loading branch information
dostuffthatmatters committed May 3, 2023
1 parent c66d872 commit dde489a
Showing 1 changed file with 19 additions and 21 deletions.
40 changes: 19 additions & 21 deletions packages/core/modules/opus_measurement.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import sys
import time
from typing import Any
import psutil
from packages.core import types, utils, interfaces


Expand Down Expand Up @@ -51,26 +50,25 @@ def __initialize(self) -> None:

# Force close all OPUS instances that are running to prevent
# Pyra opening multiple instances of OPUS
if self.opus_application_running():
logger.debug("Force-closing OPUS")
processes = [p.name() for p in psutil.process_iter()]
opus_processes = list(
filter(
lambda p: ("opus.exe" in p.lower()) or ("opuscore.exe" in p.lower()),
processes,
)
)
logger.debug(f"Found {len(opus_processes)} OPUS processes: {opus_processes}")

try:
for p in opus_processes:
exit_code = os.system(f"taskkill /f /im {p}")
assert (
exit_code == 0
), f'taskkill of "{p}" ended with an exit_code of {exit_code}'
logger.debug(f'Successfully closed OPUS instance "{p}"')
except Exception as e:
logger.warning(f"Failed to close OPUS: {e}")
# if self.opus_application_running():
# logger.debug("Force-closing OPUS")
# processes = [p.name() for p in psutil.process_iter()]
# opus_processes = list(
# filter(
# lambda p: ("opus.exe" in p.lower()) or ("opuscore.exe" in p.lower()),
# processes,
# )
# )
# logger.debug(f"Found {len(opus_processes)} OPUS processes: {opus_processes}")
# try:
# for p in opus_processes:
# exit_code = os.system(f"taskkill /f /im {p}")
# assert (
# exit_code == 0
# ), f'taskkill of "{p}" ended with an exit_code of {exit_code}'
# logger.debug(f'Successfully closed OPUS instance "{p}"')
# except Exception as e:
# logger.warning(f"Failed to close OPUS: {e}")

# note: dde servers talk to dde servers
self.server = _dde.CreateServer()
Expand Down

0 comments on commit dde489a

Please sign in to comment.