add optional restart save timeout

This commit is contained in:
zznty
2024-11-09 19:28:27 +07:00
parent d15985e918
commit 7ea0a4f8b9
3 changed files with 6 additions and 1 deletions

View File

@@ -121,6 +121,9 @@ public class TorchConfig : ViewModel, ITorchConfig
[Display(Name = "Packages", Description = "Packages to install and use.", GroupName = "Server")]
public List<string> Packages { get; set; } = new();
[Display(Name = "Restart Save Timeout", Description = "Timeout for save operation on restart in seconds.", GroupName = "Server")]
public int RestartSaveTimeout { get; set; }
// for backward compatibility
public void Save(string path = null) => Initializer.Instance?.ConfigPersistent?.Save(path);