mirror of
https://github.com/C9Glax/tranga.git
synced 2025-06-15 07:47:54 +02:00
Fi bug with exportjobslist not exporting updated jobs
This commit is contained in:
@ -167,14 +167,11 @@ public class JobBoss : GlobalBase
|
|||||||
foreach (Job job in this.jobs)
|
foreach (Job job in this.jobs)
|
||||||
{
|
{
|
||||||
string jobFilePath = Path.Join(settings.jobsFolderPath, $"{job.id}.json");
|
string jobFilePath = Path.Join(settings.jobsFolderPath, $"{job.id}.json");
|
||||||
if (!File.Exists(jobFilePath))
|
string jobStr = JsonConvert.SerializeObject(job);
|
||||||
{
|
while(IsFileInUse(jobFilePath))
|
||||||
string jobStr = JsonConvert.SerializeObject(job);
|
Thread.Sleep(10);
|
||||||
while(IsFileInUse(jobFilePath))
|
Log($"Exporting Job {jobFilePath}");
|
||||||
Thread.Sleep(10);
|
File.WriteAllText(jobFilePath, jobStr);
|
||||||
Log($"Exporting Job {jobFilePath}");
|
|
||||||
File.WriteAllText(jobFilePath, jobStr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Remove files with jobs not in this.jobs-list
|
//Remove files with jobs not in this.jobs-list
|
||||||
|
Reference in New Issue
Block a user