App: Only backup when not in debug mode
Test / Run tests (push) Successful in 2m19s

This commit is contained in:
2026-09-29 21:12:15 +02:00
parent c2bc5b221a
commit cba949d2eb
+3 -1
View File
@@ -134,7 +134,7 @@ namespace Elwig {
Utils.RunBackground("PDF Initialization", async () => Pdf.Init()); Utils.RunBackground("PDF Initialization", async () => Pdf.Init());
Utils.RunBackground("JSON Schema Initialization", BillingData.Init); Utils.RunBackground("JSON Schema Initialization", BillingData.Init);
if (Config.BackupAuto) { if (Config.BackupAuto && !Config.Debug) {
Utils.RunBackground("Automatisches Backup", async () => { Utils.RunBackground("Automatisches Backup", async () => {
Directory.CreateDirectory(Config.BackupPath); Directory.CreateDirectory(Config.BackupPath);
await Task.Delay(500); await Task.Delay(500);
@@ -219,11 +219,13 @@ namespace Elwig {
public async void ShutdownGracefully() { public async void ShutdownGracefully() {
Mouse.OverrideCursor = Cursors.AppStarting; Mouse.OverrideCursor = Cursors.AppStarting;
if (Config.BackupAuto && !Config.Debug) {
try { try {
await BackupService.TryDatabaseBackup(); await BackupService.TryDatabaseBackup();
} catch (Exception exc) { } catch (Exception exc) {
InteractionService.ShowException("Automatisches Backup", exc); InteractionService.ShowException("Automatisches Backup", exc);
} }
}
SerialPortWatcher.Dispose(); SerialPortWatcher.Dispose();
foreach (var s in EventScales) { foreach (var s in EventScales) {