Skip to content

Commit fb169e6

Browse files
zeusongitCopilot
andauthored
DYN-9093 Update default backup interval to 5 minutes (#16358)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 9446c86 commit fb169e6

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

src/DynamoCore/Configuration/PreferenceSettings.cs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,14 @@ private readonly static Lazy<PreferenceSettings>
8888
internal const int DefaultMaxNumRecentFiles = 10;
8989

9090
/// <summary>
91-
/// The default time interval between backup files. 1 minute.
91+
/// The default time interval between backup files. 5 minutes.
9292
/// </summary>
93-
internal const int DefaultBackupInterval = 60000;
93+
internal const int DefaultBackupInterval = 300000;
94+
95+
/// <summary>
96+
/// The old time interval between backup files. 1 minute.
97+
/// </summary>
98+
private const int OldDefaultBackupInterval = 60000;
9499

95100
/// <summary>
96101
/// Indicates the default render precision, i.e. the maximum number of tessellation divisions
@@ -1110,6 +1115,13 @@ public static PreferenceSettings Load(string filePath)
11101115
}
11111116
}
11121117

1118+
// If the backup interval is set to OldDefaultBackupInterval (60000ms - 1 minute), reset it to the new default value.
1119+
var savedBackUpInterval = settings?.BackupInterval;
1120+
if (savedBackUpInterval == OldDefaultBackupInterval)
1121+
{
1122+
settings.BackupInterval = DefaultBackupInterval;
1123+
}
1124+
11131125
fs.Close(); // Release file lock
11141126
}
11151127
}

0 commit comments

Comments
 (0)