fix(server): archive.json on its own timer, a live Scheduled tab in one time zone, schedule audit in words
- SchedulerHost reads archive.json every 10 minutes on its own timer. The archive-scan runs that used to do it are skipped while a long scan is pending, and the schedule may be off or daily, so uploads kept a desktop's old folder template or proxy size. - Every schedule change and run, a skipped run included, is published as a scheduleChanged event. The Scheduled tab reloads on it, so skipped runs, next-run moves and other administrators' edits show without waiting for a job. - The Scheduled tab still draws when the schedule a job links to, or an expanded one, no longer exists: its runs are dropped instead of failing the whole load. - Every time on the Scheduled tab (next run, last result, runs) is in the server's time zone, as its "Times in" line says. - Audit details name a system schedule after its key (system:<key> · name · ...). The dashboard and the Logs page show it by its localized name and the recurrence code in words, as the Scheduled tab does. Older entries keep their recorded name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit c20f573d0bdf1cdcf3a86e9702ac76a4bf9508d9)
This commit is contained in:
1 parent
e384564784
commit
3f0e6357b1
10 files changed
+339
-43
No files matched your search
@@ -4,7 +4,7 @@ namespace Chronos.Protocol;
|
||||
|
||||
/// <summary>
|
||||
/// Messages pushed on <c>WS /api/v1/events</c>. Each frame is one JSON object with a <c>type</c> discriminator:
|
||||
/// jobProgress, jobState, sequenceChanged, cardEvent, nodeState.
|
||||
/// jobProgress, jobState, sequenceChanged, cardEvent, nodeState, scheduleChanged.
|
||||
/// </summary>
|
||||
[JsonPolymorphic(TypeDiscriminatorPropertyName = "type")]
|
||||
[JsonDerivedType(typeof(JobProgressEvent), "jobProgress")]
|
||||
@@ -12,6 +12,7 @@ namespace Chronos.Protocol;
|
||||
[JsonDerivedType(typeof(SequenceChangedEvent), "sequenceChanged")]
|
||||
[JsonDerivedType(typeof(CardEvent), "cardEvent")]
|
||||
[JsonDerivedType(typeof(NodeStateEvent), "nodeState")]
|
||||
[JsonDerivedType(typeof(ScheduleChangedEvent), "scheduleChanged")]
|
||||
public abstract record ServerEvent;
|
||||
|
||||
public sealed record JobProgressEvent(Guid JobId, long Done, long Total, double? ItemsPerSecond, double? EtaSeconds) : ServerEvent;
|
||||
@@ -41,3 +42,9 @@ public static class CardImportStates
|
||||
}
|
||||
|
||||
public sealed record NodeStateEvent(Guid NodeId, string ClientName, string State) : ServerEvent;
|
||||
|
||||
/// <summary>
|
||||
/// A schedule of the server was created, edited, reset, deleted (<see cref="Deleted"/>) or ran, a run that queued nothing
|
||||
/// included, or its next run moved (owner review 2, R10): the admin panel's Scheduled tab reads the list again.
|
||||
/// </summary>
|
||||
public sealed record ScheduleChangedEvent(Guid ScheduleId, bool Deleted) : ServerEvent;
|
||||
Reference in new issue
Block a user