ow
This commit is contained in:
1 parent
2c6475b2d5
commit
5fe7c6260e
4 files changed
+21
-6
No files matched your search
+11
-2
@@ -22,10 +22,19 @@ namespace CloudBuilder.Topshelf.Python
|
||||
if (!File.Exists(file)) return;
|
||||
|
||||
string init = File.ReadAllText(file, Encoding.UTF8);
|
||||
|
||||
File.AppendAllText("log.txt", "SoVITS:" + file + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "\r\n");
|
||||
using (Py.GIL())
|
||||
{
|
||||
python.Exec(init);
|
||||
try
|
||||
{
|
||||
python.Exec(init);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
File.AppendAllText("log.txt", "SoVITS-Exec:" + ex.Message + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "\r\n");
|
||||
}
|
||||
|
||||
File.AppendAllText("log.txt", "SoVITS-Exec:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user