feat: owner review 2 phase 2: scheduled jobs and log settings (#10)
CI / Build and test (push) Successful in 7m0s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 6s
Release / Build, test and publish (push) Successful in 13m28s
CI / PostgreSQL 16 integration (push) Successful in 5m52s
CI / PostgreSQL 17 integration (push) Successful in 4m50s
CI / Docker image (push) Successful in 1m4s
Release / Server image (push) Successful in 1m35s
CI / Build and test (push) Successful in 7m0s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 6s
Release / Build, test and publish (push) Successful in 13m28s
CI / PostgreSQL 16 integration (push) Successful in 5m52s
CI / PostgreSQL 17 integration (push) Successful in 4m50s
CI / Docker image (push) Successful in 1m4s
Release / Server image (push) Successful in 1m35s
- Jobs > Scheduled on the desktop and the admin panel. Every timer that queued work is now a visible system schedule: archive scan, upload clean-up, index backup, job-history and audit clean-ups, desktop housekeeping. New actions: verify, thumbnails, proxies, analysis, maintenance, backup, clean-ups, reports. - The scheduler: migration 0007, in-house recurrence, compare-and-set claim, catch-up, scan at start. - Log settings: levels, retention, size parts, total limit, daily or hourly rotation, audit retention, diagnostics share; the server writes Debug/Trace to its files again; logging never fails a job. Upgrade: CHRONOS_LOG_LEVEL set in an existing container locks both levels; migration 0007 is one-way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
This commit was merged in pull request #10.
This commit is contained in:
1 parent
1f089888e8
commit
af9eeaab9b
349 files changed
+28341
-1304
No files matched your search
@@ -182,6 +182,63 @@ public sealed record Job
|
||||
public DateTimeOffset Created { get; init; }
|
||||
public DateTimeOffset? Started { get; init; }
|
||||
public DateTimeOffset? Finished { get; init; }
|
||||
|
||||
/// <summary>The schedule that queued this job; null for jobs queued by a user or by other jobs (owner review 2, R10).</summary>
|
||||
public Guid? ScheduleId { get; init; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A recurring job (owner review 2, R10): an action (scan, verify, backup, …) with its parameters, run on a recurrence
|
||||
/// in the host's time zone. System schedules (<see cref="SystemKey"/> set) stand for the timers a host used to run out of
|
||||
/// sight; they are seeded once, can be edited and reset, never deleted.
|
||||
/// </summary>
|
||||
public sealed record Schedule
|
||||
{
|
||||
public required Guid Id { get; init; }
|
||||
|
||||
/// <summary>Stable key of a host's system schedule (<c>archive-scan</c>); null for schedules a user created.</summary>
|
||||
public string? SystemKey { get; init; }
|
||||
|
||||
public required string Name { get; init; }
|
||||
|
||||
/// <summary>Wire name of the action (<c>scan</c>, <c>verify</c>, <c>backup</c>…).</summary>
|
||||
public required string Action { get; init; }
|
||||
|
||||
/// <summary>What the action works on: <c>current</c>, the host's archive.</summary>
|
||||
public string Target { get; init; } = "current";
|
||||
|
||||
/// <summary>The action's parameters as JSON (camelCase, only the fields the action reads).</summary>
|
||||
public string? ParametersJson { get; init; }
|
||||
|
||||
/// <summary>The recurrence in its text form (<c>every:10m</c>, <c>daily:03:00</c>, <c>weekly:mon,thu@02:30</c>, <c>monthly:1@04:00</c>).</summary>
|
||||
public required string Recurrence { get; init; }
|
||||
|
||||
/// <summary>A run missed while the host was off happens once when it comes back; otherwise it is skipped.</summary>
|
||||
public bool CatchUp { get; init; } = true;
|
||||
|
||||
/// <summary>Priority of the jobs it queues.</summary>
|
||||
public JobPriority Priority { get; init; } = JobPriority.Background;
|
||||
|
||||
public bool Enabled { get; init; } = true;
|
||||
|
||||
/// <summary>When it fires next (UTC); null while disabled or not computed yet.</summary>
|
||||
public DateTimeOffset? NextRun { get; init; }
|
||||
|
||||
public DateTimeOffset? LastRun { get; init; }
|
||||
|
||||
/// <summary>The first job the last run queued.</summary>
|
||||
public Guid? LastJobId { get; init; }
|
||||
|
||||
/// <summary>What the last run did: <c>queued</c>, <c>skipped-pending</c>, <c>skipped-offline</c>, <c>skipped-nothing</c>,
|
||||
/// <c>unavailable</c> or <c>failed:<reason></c>.</summary>
|
||||
public string? LastOutcome { get; init; }
|
||||
|
||||
public Guid? CreatedBy { get; init; }
|
||||
public DateTimeOffset Created { get; init; }
|
||||
public DateTimeOffset Updated { get; init; }
|
||||
|
||||
/// <summary>True for a host's system schedule.</summary>
|
||||
public bool IsSystem => SystemKey is not null;
|
||||
}
|
||||
|
||||
/// <summary>A memory card known to this client (BRIEF §13).</summary>
|
||||
|
||||
Reference in new issue
Block a user