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
@@ -67,6 +67,32 @@ public sealed class PostgresServerTests(TestContext context)
|
||||
await Api.SequenceTests.FramesOfOneVersionAsync(server);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task SchedulesRunOnPostgresWithoutAnIndexBackup()
|
||||
{
|
||||
await using var schema = await Schema.CreateAsync(context);
|
||||
await using var server = await TestServer.StartAsync(context, o =>
|
||||
{
|
||||
o.Database = DatabaseKind.Postgres;
|
||||
o.DbConnectionString = schema.ConnectionString;
|
||||
}, Chronos.Server.Storage.ArchiveModule.Register);
|
||||
var admin = await server.AdminAsync();
|
||||
using var response = await admin.GetAsync("/api/v1/schedules");
|
||||
var list = await response.ReadAsync(ProtocolJson.Default.SchedulesDto);
|
||||
|
||||
// PostgreSQL is backed up with its own tools (owner review 2, R10): no index-backup schedule, and the action says why.
|
||||
Assert.SequenceEqual(["archive-scan", "upload-cleanup", "housekeeping", "audit-cleanup"], list.Items.Select(s => s.SystemKey));
|
||||
var backup = list.Actions.Single(a => a.Name == "backup");
|
||||
Assert.Equal((false, "postgres"), (backup.Available, backup.Reason));
|
||||
|
||||
// A run is claimed, queued and recorded on PostgreSQL as on SQLite.
|
||||
var history = list.Items.Single(s => s.SystemKey == "housekeeping");
|
||||
using var run = await admin.PostAsync($"/api/v1/schedules/{history.Id}/run", null);
|
||||
var ran = await run.ReadAsync(ProtocolJson.Default.ScheduleRunDto);
|
||||
Assert.Equal(("queued", ran.JobId), (ran.Outcome, ran.Schedule.LastJobId));
|
||||
await JobApiTests.WaitForAsync(admin, ran.JobId!.Value, "done");
|
||||
}
|
||||
|
||||
/// <summary>A throw-away schema on the test server, selected through <c>Search Path</c>.</summary>
|
||||
private sealed class Schema : IAsyncDisposable
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user