Implement per-school save functionality by introducing a dedicated save directory and updating the school management system to support loading and saving school states. Revise documentation to reflect these changes, including updates to the architecture and design documents, and enhance the API for reloading schools from disk. Update tests to ensure proper functionality of the new save and reload features.
This commit is contained in:
@@ -18,8 +18,8 @@ public readonly record struct SchoolCreationResult(School? School, SchoolCreatio
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Every school that currently exists, plus the cap from configuration. Not thread-safe by design —
|
||||
/// only the loop thread touches it, everything else goes through the command queue in the server.
|
||||
/// In-memory set of schools plus the cap from configuration. Not thread-safe — unit tests and
|
||||
/// name/limit checks use it; the live server gives each school its own worker instead.
|
||||
/// </summary>
|
||||
public sealed class SchoolRegistry : IDisposable
|
||||
{
|
||||
@@ -67,7 +67,7 @@ public sealed class SchoolRegistry : IDisposable
|
||||
return SchoolCreationResult.Failed(SchoolCreationError.InvalidStartDate);
|
||||
}
|
||||
|
||||
var school = new School(_nextId++, normalized, startDate);
|
||||
var school = School.Create(_nextId++, normalized, startDate);
|
||||
_schools.Add(school);
|
||||
|
||||
return new SchoolCreationResult(school, SchoolCreationError.None);
|
||||
|
||||
Reference in New Issue
Block a user