Fi bug with exportjobslist not exporting updated jobs
This commit is contained in:
parent
f5b6b1785f
commit
c1aa4cf6b5
@ -167,15 +167,12 @@ 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);
|
string jobStr = JsonConvert.SerializeObject(job);
|
||||||
while(IsFileInUse(jobFilePath))
|
while(IsFileInUse(jobFilePath))
|
||||||
Thread.Sleep(10);
|
Thread.Sleep(10);
|
||||||
Log($"Exporting Job {jobFilePath}");
|
Log($"Exporting Job {jobFilePath}");
|
||||||
File.WriteAllText(jobFilePath, jobStr);
|
File.WriteAllText(jobFilePath, jobStr);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//Remove files with jobs not in this.jobs-list
|
//Remove files with jobs not in this.jobs-list
|
||||||
Regex idRex = new (@"(.*)\.json");
|
Regex idRex = new (@"(.*)\.json");
|
||||||
|
Loading…
Reference in New Issue
Block a user