mirror of
https://github.com/chidiwilliams/buzz.git
synced 2026-03-14 14:45:46 +01:00
Fix for app cleanup (#1299)
This commit is contained in:
parent
97408c6a98
commit
454a03bb59
4 changed files with 6 additions and 16 deletions
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
|
|
@ -59,18 +59,6 @@ jobs:
|
|||
path: .venv
|
||||
key: venv-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/uv.lock') }}
|
||||
|
||||
- name: Load cached Whisper models
|
||||
id: cached-whisper-models
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/Library/Caches/Buzz
|
||||
~/.cache/whisper
|
||||
~/.cache/huggingface
|
||||
~/.cache/Buzz
|
||||
~/AppData/Local/Buzz/Buzz/Cache
|
||||
key: whisper-models-${{ runner.os }}
|
||||
|
||||
- uses: AnimMouse/setup-ffmpeg@v1
|
||||
id: setup-ffmpeg
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -45,7 +45,9 @@ def _setup_db(path: str) -> QSqlDatabase:
|
|||
|
||||
def close_app_db():
|
||||
db = QSqlDatabase.database()
|
||||
if not db.isValid():
|
||||
return
|
||||
|
||||
if db.isOpen():
|
||||
logging.debug("Closing database connection: %s", db.databaseName())
|
||||
db.close()
|
||||
QSqlDatabase.removeDatabase(QSqlDatabase.defaultConnection)
|
||||
logging.debug("Closing database connection: %s", db.connectionName())
|
||||
db.close()
|
||||
|
|
@ -12,7 +12,6 @@ class Settings:
|
|||
def __init__(self, application=""):
|
||||
self.settings = QSettings(APP_NAME, application)
|
||||
self.settings.sync()
|
||||
logging.debug(f"Settings filename: {self.settings.fileName()}")
|
||||
|
||||
class Key(enum.Enum):
|
||||
RECORDING_TRANSCRIBER_TASK = "recording-transcriber/task"
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ class Application(QApplication):
|
|||
self.setStyle(QStyleFactory.create("Fusion"))
|
||||
|
||||
self.settings = Settings()
|
||||
logging.debug(f"Settings filename: {self.settings.settings.fileName()}")
|
||||
|
||||
# Set BUZZ_FORCE_CPU environment variable if Force CPU setting is enabled
|
||||
force_cpu_enabled = self.settings.value(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue