Merge branch 'refs/heads/cuttingedge-merge-ServerV2' into Server-V2

This commit is contained in:
Glax 2024-10-31 20:43:21 +01:00
commit 1cb8899195

View File

@ -28,9 +28,9 @@ public class JobBoss : GlobalBase
}
else
{
Log($"Added {job}");
if (!this.jobs.Add(job))
return false;
Log($"Added {job}");
UpdateJobFile(job, jobFile);
}
return true;
@ -168,8 +168,12 @@ public class JobBoss : GlobalBase
else
{
Log($"Adding Job {job}");
if(!AddJob(job, file.Name)) //If we detect a duplicate, delete the file.
file.Delete();
if (!AddJob(job, file.FullName)) //If we detect a duplicate, delete the file.
{
string path = string.Concat(file.FullName, ".failed");
file.MoveTo(path);
Log($"Duplicate detected or otherwise not able to add job to list.\nMoved job {job} to {path}");
}
}
}