wip(processing): analysis and render job handlers, render node client (interrupted)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-02 16:33:27 +00:00
1 parent f4e2f285a9
commit fee198f627
30 files changed
+2262 -21

No files matched your search

+16 -9
View File
@@ -189,16 +189,23 @@ public sealed class LeaseFile : IDisposable
private static bool TryCreate(string path, LeaseRecord record)
{
try
for (var attempt = 1; ; attempt++)
{
using var fs = new FileStream(path, FileMode.CreateNew, FileAccess.Write, FileShare.Read);
fs.Write(JsonSerializer.SerializeToUtf8Bytes(record, ArchiveJson.Default.LeaseRecord));
fs.Flush(flushToDisk: true);
return true;
}
catch (IOException) when (File.Exists(path))
{
return false;
try
{
using var fs = new FileStream(path, FileMode.CreateNew, FileAccess.Write, FileShare.Read);
fs.Write(JsonSerializer.SerializeToUtf8Bytes(record, ArchiveJson.Default.LeaseRecord));
fs.Flush(flushToDisk: true);
return true;
}
catch (IOException) when (File.Exists(path))
{
return false;
}
catch (IOException) when (attempt < 3)
{
// The holder released the lease between the failed create and the check: the name is free again.
}
}
}