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
+236
-28
@@ -305,9 +305,19 @@ Primary entities (identical concepts in SQLite and PostgreSQL; ids are UUIDv7 st
|
||||
- **Render** — id, sequence id, preset name, settings JSON, output relative path, codec,
|
||||
width, height, fps, duration, bytes, created, produced by (client id / server / node).
|
||||
- **Job** — id, kind (scan, rebuild, verify, light-analyse, deep-analyse, proxies,
|
||||
thumbs, render, import, upload-commit, maintenance), target ids, state (queued, running,
|
||||
paused, done, failed, cancelled), progress (done/total, fps, eta), log tail, created by,
|
||||
node id, attempts, error.
|
||||
thumbs, render, import, upload-commit, maintenance; backup, cleanup, and the read-only
|
||||
duplicates and orphans reports), target ids, state (queued, running, paused, done, failed,
|
||||
cancelled), progress (done/total, fps, eta), log tail, created by, node id, attempts,
|
||||
error, schedule id (the schedule that queued it; amended 2026-10-26, R10).
|
||||
- **Schedule** (amended 2026-10-26, R10) — id, system key (set, and unique, on a host's
|
||||
system schedules, §14.6), name, action (scan, verify, thumbnails, proxies, analysis,
|
||||
maintenance, backup, cleanup, duplicates, orphans), target (`current`: the host's
|
||||
archive), parameters JSON, recurrence (text, no cron: `every:<n>m|h|d` from 5 minutes to
|
||||
a day, 1–168 hours or 1–366 days; `daily:HH:MM`; `weekly:mon,thu@HH:MM`;
|
||||
`monthly:<1–28>@HH:MM`; wall-clock times of the host's zone), catch-up, priority of its
|
||||
jobs, enabled, next run (none while disabled), last run, last job id, last outcome
|
||||
(queued, skipped-pending, skipped-offline, skipped-nothing, unavailable,
|
||||
failed:<reason>), created by, created, updated.
|
||||
- **MediaCard** (client) — id, volume serial, filesystem label, capacity, nickname, camera
|
||||
identity (Make/Model/BodySerial from first file), profile JSON, first/last seen, import
|
||||
history (job ids).
|
||||
@@ -323,7 +333,8 @@ Primary entities (identical concepts in SQLite and PostgreSQL; ids are UUIDv7 st
|
||||
- **AuditLog** (server) — who did what to which sequence/user, when.
|
||||
|
||||
Indexes: `frame(sequence_id, index)`, `frame(sha256)`, `frame(captured_at)`,
|
||||
`sequence(archive_id, first_capture)`, `sequence(camera_model)`, tags, jobs by state.
|
||||
`sequence(archive_id, first_capture)`, `sequence(camera_model)`, tags, jobs by state and by
|
||||
schedule, `schedules(enabled, next_run)` (amended 2026-10-26, R10).
|
||||
Paging everywhere (keyset pagination on `(first_capture, id)`).
|
||||
|
||||
---
|
||||
@@ -363,7 +374,14 @@ helper.
|
||||
- Location: `%LOCALAPPDATA%\Chronos\chronos.db` (never Documents/OneDrive-synced folders —
|
||||
SQLite in a synced folder corrupts). Portable mode: `portable.txt` next to the exe puts
|
||||
everything under `.\data\`.
|
||||
- Backups: `VACUUM INTO` nightly copy kept ×3; restore from Settings › Advanced.
|
||||
- Backups: `VACUUM INTO` copies into `backups` next to the index, made by the Backup jobs of
|
||||
the `index-backup` system schedule (§14.6: every day on the desktop, daily at 03:00 on a
|
||||
server, both with catch-up; the first start after an upgrade copies at once when the
|
||||
newest copy is a day old), by *Back up now* (Settings › Advanced) and *Back up database*
|
||||
(Archive › Maintenance), and of the index a restore replaces. Every copy prunes the folder
|
||||
to the largest *Copies kept* of the backup schedules (3 by default), so no schedule
|
||||
deletes copies another one keeps. Restore from Settings › Advanced. (Amended 2026-10-26,
|
||||
R10.)
|
||||
|
||||
### 6.3 PostgreSQL client (`Chronos.Data.Postgres`) — in-house wire protocol v3
|
||||
|
||||
@@ -415,7 +433,8 @@ Rules: originals are immutable (never rewritten; edits are settings); every writ
|
||||
sidecar goes to a temp file, `fsync`, rename; the folder name is derived from templates at
|
||||
import time and never auto-renamed afterwards (renaming is a user mass-operation that
|
||||
updates sidecars and DB together). Network drives: UNC or mapped paths; long-path aware
|
||||
(`\\?\` prefix); no `FileSystemWatcher` reliance — periodic polling by mtime/size plus manual
|
||||
(`\\?\` prefix); no `FileSystemWatcher` reliance — periodic polling by mtime/size (the
|
||||
*Archive scan* system schedule of each host, §14.6; amended 2026-10-26, R10) plus manual
|
||||
rescan; offline detection with graceful read-only state.
|
||||
|
||||
### 7.1 Naming templates
|
||||
@@ -847,12 +866,47 @@ files, with fix actions), **Adopt folder** (index an existing tree in place or c
|
||||
the layout), **Merge/split sequences**, **Move archive** (relink), **Maintenance**
|
||||
(SQLite vacuum/backup/restore, cache cleanup, proxy purge/rebuild, thumbnail pack
|
||||
compaction, log rotation). Statistics drawn with in-house chart elements. Every operation
|
||||
is a Job (resumable, cancellable, logged).
|
||||
is a Job (resumable, cancellable, logged). Recurring scans, integrity checks, thumbnails,
|
||||
proxies, analyses, maintenance, backups, clean-ups and reports are schedules in Jobs ›
|
||||
Scheduled (§12.6, §14.6); the buttons here run them once (amended 2026-10-26, R10).
|
||||
|
||||
### 12.6 Jobs
|
||||
|
||||
Queue + history table: kind, target, progress, fps, ETA, node, state; pause/resume/cancel/
|
||||
retry; log tail on expand; filters. Global job bar mirrors the active job.
|
||||
Two tabs, a *Queue | Scheduled* segmented control first in the toolbar (amended 2026-10-26,
|
||||
R10; a tab, not a rail entry, so a schedule and the jobs it queued are side by side):
|
||||
|
||||
- **Queue**: queue + history table: kind, target, progress, fps, ETA, node, state;
|
||||
pause/resume/cancel/retry; log tail on expand; filters. A job a schedule queued carries a
|
||||
*Scheduled* pill. The history line gives the job-history days of the Housekeeping schedule
|
||||
(*Full history kept* while it is off or at 0).
|
||||
- **Scheduled**: every schedule of this PC, the system ones first: *Archive scan* (every 10
|
||||
minutes, or the interval the former Settings › Archive › Rescan every had, no catch-up; a
|
||||
scan follows Settings › Analysis › After a scan at every run; it also runs once after the
|
||||
archive is reopened at start and when an unplugged archive is back), *Index backup*
|
||||
(every day, catch-up, 3 copies kept) and *Housekeeping* (daily at 04:00, catch-up:
|
||||
job history older than 90 days, the cache trimmed to Settings › Storage › Cache limit,
|
||||
oldest files first, never files in use, synced proxies, the render node's cache or import
|
||||
staging). Each row: an on/off switch, name (a system schedule by its key, in the UI
|
||||
language), action, when (in the UI language), next run (Today, Tomorrow or a date, and a
|
||||
time), last result (the state of the job it queued, else the outcome), Run now, Edit, and
|
||||
Reset (system schedules) or Delete (the user's), both confirmed. Selecting a schedule
|
||||
lists its last runs; *Show in queue* opens the job in the Queue tab with its log. Which
|
||||
actions this PC runs is read again when the tab is shown and after a Run now that finds
|
||||
one unavailable; without an index the tab says the schedules do not run.
|
||||
- *New schedule* (the toolbar's end) and Edit open an in-window editor: name (a system
|
||||
schedule keeps its name and action); action (those this PC cannot run disabled, the reason
|
||||
in the tooltip); *Repeat* Every / Daily / Weekly / Monthly with their fields (interval 5
|
||||
minutes to a day, 1–168 hours or 1–366 days; a time of this PC's clock; days of the week
|
||||
in the UI language's order; day 1–28 of the month); the action's parameters (full scan,
|
||||
rebuild all, deep analysis, unverified for or older than n days, at most a share of the
|
||||
sequences, report only, copies kept, clean-up steps); priority; catch-up; on. Every field
|
||||
is checked as it is typed.
|
||||
- No work recurs out of sight: every timer that queues work is a schedule here (§14.6). A
|
||||
schedule's background run raises a toast only when it fails, unless it is upkeep the next
|
||||
run repeats (scan, thumbnails, proxies, light analysis, clean-up); Run now raises one only
|
||||
when it queued nothing.
|
||||
|
||||
Global job bar mirrors the active job.
|
||||
|
||||
### 12.7 Server (client side)
|
||||
|
||||
@@ -875,15 +929,23 @@ mine / take server / save both).
|
||||
|
||||
Sections (list on the left, controls on the right, no descriptions — tooltips only):
|
||||
General (language, theme, startup, notifications), Archive (root, templates, proxy policy,
|
||||
thumbnail size, network polling), Import (defaults, session rules, verify, post-actions),
|
||||
Analysis (widths, thresholds, deep analysis auto-run), Rendering (quality profile, memory
|
||||
budget, spill folder, parallelism = photos the running job processes at once, priority queue
|
||||
thumbnail size; the rescans are the Archive scan schedule of Jobs › Scheduled, §12.6, so
|
||||
*Rescan every* is gone; amended 2026-10-26, R10), Import (defaults, session rules, verify,
|
||||
post-actions), Analysis (widths, thresholds, deep analysis auto-run), Rendering (quality
|
||||
profile, memory budget, spill folder, parallelism = photos the running job processes at once, priority queue
|
||||
with a level per job kind, encoders detected, hardware preference; amended 2026-10-16, R2),
|
||||
Formats (per
|
||||
format tier on this PC, codec install links), Server (last servers, trusted fingerprints,
|
||||
render node), Updates (check on start; latest version: check now, download, releases page),
|
||||
Advanced (portable mode, data folder, logs, diagnostics bundle, database backup/restore,
|
||||
reset), About last (§12.9). Each action has one place in Settings (amended 2026-10-26, R5).
|
||||
Advanced (portable mode, data folder; logs: the logs folder, *Log level* (Trace…Error,
|
||||
default Info), *Keep logs* (1–365 days, default 14), *File size* (MB, default 50, or No
|
||||
limit), *Logs total* (MB, default 1,024, or No limit; never below the file size),
|
||||
*Rotation* (Daily or Hourly, UTC), *Diagnostics logs* (MB of the end of each log in the
|
||||
bundle, default 4), applied to the log files from their first line and at once when
|
||||
changed; diagnostics bundle, database backup/restore (*Back up now* keeps as many copies as
|
||||
the backup schedules, §6.2, R10), reset; Reset restores the log rows; amended 2026-10-26,
|
||||
R11), About last (§12.9). Each action has one place in Settings
|
||||
(amended 2026-10-26, R5).
|
||||
Import/export settings as JSON.
|
||||
|
||||
### 12.9 About
|
||||
@@ -936,6 +998,23 @@ for events, in-house structured file logging (`Microsoft.Extensions.Logging` abs
|
||||
are part of the shared framework; the file provider is in-house), in-house rate limiting for
|
||||
login and uploads, health endpoint, graceful shutdown (jobs checkpoint).
|
||||
|
||||
Logging (amended 2026-10-26, R11): files `/data/logs/server-yyyyMMdd.log`, or
|
||||
`server-yyyyMMdd-HH.log` with hourly rotation (UTC). A file that reaches the size limit (50
|
||||
MB by default, MB of 2²⁰ bytes; 0 = no limit) continues in `.1.log`, `.2.log`…, and a
|
||||
restart continues the period's newest part. At every new file, and when the settings
|
||||
change, files older than the retention (14 days) are deleted, then the oldest while all
|
||||
the files exceed the total limit (1,024 MB; 0 = no limit; never below one file), never
|
||||
the file being written and never a name the sink did not write. The console and the files
|
||||
have their own levels (Information by default), which the logging filters read at every
|
||||
line, so a change in the admin panel applies at once; ASP.NET Core's own categories never
|
||||
write below Warning, the host's lifetime never below Information; the engine's level is
|
||||
the lower of the console's and the files'. Logging never fails what logs: a line that
|
||||
cannot be written (the folder removed, a full disk) is dropped and the next one tries the
|
||||
file again (a removed folder is not created again), so a job still ends Failed and the job
|
||||
engine and the scheduler go on. The desktop programs use the same sink (`chronos-`,
|
||||
`uploader-`, `setup-` files, with the default limits; Chronos takes its own from Settings ›
|
||||
Advanced, §12.8).
|
||||
|
||||
### 14.2 Security
|
||||
|
||||
- TLS: `auto` (self-signed cert generated at first start with `CertificateRequest`, stored
|
||||
@@ -977,7 +1056,9 @@ GET /api/v1/uploads/{id} resume state
|
||||
DELETE /api/v1/uploads/{id}
|
||||
|
||||
GET /api/v1/jobs?state · POST /jobs {kind, target, params} · GET /jobs/{id} · POST /jobs/{id}/cancel · /retry
|
||||
WS /api/v1/events {type: jobProgress|jobState|sequenceChanged|cardEvent|nodeState, …}
|
||||
GET /api/v1/schedules schedules (system ones first), actions with availability, time zone, clean-up steps (admin)
|
||||
POST /api/v1/schedules · GET/PUT/PATCH/DELETE /schedules/{id} · POST /schedules/{id}/run · /reset · GET /schedules/{id}/runs?cursor&limit
|
||||
WS /api/v1/events {type: jobProgress|jobState|sequenceChanged|cardEvent|nodeState|scheduleChanged, …}
|
||||
|
||||
POST /api/v1/nodes/register · POST /nodes/{id}/heartbeat · POST /nodes/{id}/claim → job · POST /nodes/{id}/jobs/{jobId}/result (chunked upload of output)
|
||||
|
||||
@@ -985,6 +1066,21 @@ GET/PUT /api/v1/archive/settings · POST /archive/scan · /rebuild · /verify ·
|
||||
GET /api/v1/i18n/{culture} strings for the web admin
|
||||
```
|
||||
|
||||
Schedules (amended 2026-10-26, R10; ManageArchive, every change audited): `PUT` and
|
||||
`PATCH` change the fields given; an invalid field is 400 `invalid_schedule` with the field
|
||||
as details (`name`, `recurrence`, `parameters.percent`…); a system schedule is never
|
||||
deleted (409 `schedule_system`) and keeps its name and action; run now is refused while the
|
||||
schedule's last job is queued, running or paused (409 `schedule_pending`, nothing recorded);
|
||||
only system schedules reset (409 `schedule_no_defaults`); changing an age limit an
|
||||
environment variable fixes, or turning that schedule off while the limit is above 0, is 409
|
||||
`setting_locked`.
|
||||
`JobDto.scheduleId` names the schedule that queued a job; `POST /jobs` with kind
|
||||
`duplicates` or `orphans` queues a read-only report job. `scheduleChanged {scheduleId,
|
||||
deleted}` follows every create, edit, reset, delete and run (also one that queued nothing)
|
||||
and every move of a next run; older clients ignore it. `GET/PUT /server/settings` carries
|
||||
the log group `logs` (R11; a `PUT` without it keeps the log settings) and `lockedBy`, the
|
||||
environment variable that fixes each locked setting (ignored when saving).
|
||||
|
||||
### 14.4 Upload and ingest
|
||||
|
||||
Client computes SHA-256 while reading; `POST /uploads` short-circuits if the hash exists;
|
||||
@@ -1014,15 +1110,91 @@ it itself (managed formats) or hands it to a render node.
|
||||
Persistent queue in the DB; jobs run one at a time, and the parallelism (configurable,
|
||||
default = cores/2) is how many photos the running job processes at once; job kinds in §5;
|
||||
checkpoints every 5 s (progress + resumable cursor); crash-safe restart; priorities
|
||||
(user-initiated > background analysis); cancellation cooperative; logs per job; retention
|
||||
of history 90 days. By default a new job waits its turn, and pausing the running job lets
|
||||
the next one start. An optional priority queue (Settings › Rendering on the desktop, the
|
||||
admin panel's Settings on the server) gives each job kind a level (high, normal, low):
|
||||
(user-initiated > background analysis); cancellation cooperative; logs per job; finished
|
||||
jobs kept 90 days by the housekeeping schedule, below (amended 2026-10-26, R10). By default
|
||||
a new job waits its turn, and pausing the running job lets the next one start. An optional
|
||||
priority queue (Settings › Rendering on the desktop, the admin panel's Settings on the
|
||||
server) gives each job kind a level (high, normal, low):
|
||||
higher kinds are claimed first, and a queued job of a higher level makes the running job
|
||||
of a lower level yield without asking; that job returns to the queue with its checkpoint
|
||||
and resumes by itself afterwards. Jobs of the same level never interrupt each other, and a
|
||||
job's own follow-ups never interrupt it. (Amended 2026-10-16, R2.)
|
||||
|
||||
Scheduled jobs (amended 2026-10-26, R10). Recurring work is queued only by schedules (§5),
|
||||
shown in Jobs › Scheduled on the desktop (§12.6) and the admin panel (§14.8): no job is
|
||||
pre-scheduled out of sight. Each host runs one scheduler beside its job engine. Every timer
|
||||
that used to queue work is a **system schedule**: seeded at start by its key when missing
|
||||
(`INSERT … ON CONFLICT (system_key) DO NOTHING`), so the user's edits survive restarts and
|
||||
upgrades; it can be edited, turned off and reset to the host's defaults (the options as
|
||||
they are then), never deleted, and it keeps its name and action. On the server:
|
||||
|
||||
| Key | Action | When | Catch-up | Notes |
|
||||
|---|---|---|---|---|
|
||||
| `archive-scan` | incremental scan, background | every 10 min, and once at start | no | |
|
||||
| `upload-cleanup` | `uploads` step: uploads idle for `UploadRetentionHours` (48) expire, orphan part files and day-old staging files go, records of uploads finished over 90 days ago and expired tokens are purged | every 6 h | yes | an idle upload expires up to 6 h after its 48 h |
|
||||
| `index-backup` | backup, 3 copies kept | daily 03:00 | yes | SQLite only (PostgreSQL uses its own tools) |
|
||||
| `housekeeping` | `job-history` step, `JobHistoryDays` (90) | daily 04:00 | yes | |
|
||||
| `audit-cleanup` | `audit` step, `AuditRetentionDays` (0) | daily 04:30 | yes | off at 0: the audit log is kept |
|
||||
|
||||
The server's options are what its system schedules are seeded and reset with. The audit
|
||||
retention has one source, the `audit-cleanup` schedule: Settings › Logs › *Keep audit*
|
||||
shows its age limit (0 while it is off) wherever it was last set, and saving another value
|
||||
sets it (on with that limit, off at 0, no restart) and stores it as `AuditRetentionDays`,
|
||||
the reset default. `CHRONOS_AUDIT_RETENTION_DAYS` is put into the schedule at every start
|
||||
before the first pass, so a run caught up at start already uses it, and locks it (§14.3).
|
||||
`JobHistoryDays` is likewise only the `housekeeping` schedule's reset default.
|
||||
|
||||
On the desktop: `archive-scan` (every 10 minutes, seeded from the former Rescan every; no
|
||||
catch-up; also once after the archive is reopened at start and when an unplugged archive is
|
||||
back), `index-backup` (every day, catch-up, 3 copies) and `housekeeping` (daily 04:00,
|
||||
catch-up: `job-history` 90 days and `cache-trim`). A system schedule whose work was last
|
||||
done a whole period ago (the newest index copy, for `index-backup`) is seeded due at once,
|
||||
so the first start after an upgrade copies an index whose newest copy is a day old;
|
||||
otherwise a new schedule first runs at its recurrence's first occurrence (an interval one
|
||||
interval after it is created). Times are wall-clock times of the host's zone: the PC's, or
|
||||
the container's `TZ` (UTC, with a warning, when the image does not know it), which the
|
||||
admin panel's Scheduled tab names.
|
||||
|
||||
The scheduler looks every 30 s (the desktop's also at once when its archive is back or its
|
||||
job settings are saved). A run is claimed by moving its next run with a compare-and-set on
|
||||
`next_run`, so processes sharing a database fire it once (a crash between the claim and the
|
||||
queueing loses that one run). A run queues the action's jobs at the schedule's priority
|
||||
with `jobs.schedule_id`, at most 500 sequences per job; it queues nothing, and records why, while
|
||||
the schedule's previous job, or a job doing the same work on the archive, is queued, running
|
||||
or paused (`skipped-pending`), while the archive is missing or offline (or read-only, for an
|
||||
action that writes: `skipped-offline`), when there is nothing to do (`skipped-nothing`), or
|
||||
when the host cannot run the action (`unavailable`: no handler, PostgreSQL or an index
|
||||
without a file for backups, proxies turned off). A run more than 5 minutes late (the host
|
||||
was off, the PC slept) was missed: with catch-up it fires once, otherwise the schedule moves
|
||||
to its next occurrence; intervals stay on the grid of their due times. A time a
|
||||
spring-forward gap skips moves forward by the gap; a time the clocks go back over runs once,
|
||||
at its first occurrence; a next run more than two periods ahead means the clock went back
|
||||
and is computed again. Run now queues at once, also for a disabled schedule, without moving
|
||||
the next run.
|
||||
|
||||
Actions: *scan* (`force`: full; `deep`: deep analysis of what it indexes, unset: as the host
|
||||
says at the run, Settings › Analysis › After a scan on the desktop, off on the server),
|
||||
*verify* (`percent` of the sequences per run, never-verified then least recently verified
|
||||
first, those unverified for `olderThanDays`), *thumbnails* and *proxies* (missing ones, or
|
||||
`force` all; proxies only when the archive makes them), *analysis* (light, or `deep`),
|
||||
*maintenance* (`dryRun`), *backup* (`keep`), *cleanup* (`steps`, `olderThanDays`) and the
|
||||
read-only *duplicates* and *orphans* reports in the job log. Clean-up steps: `job-history`
|
||||
(finished jobs; the engine no longer purges them at start), `audit` (0 days keeps
|
||||
everything), `trash-report` (lists trash entries older than the limit with their sizes and
|
||||
never deletes: emptying the trash stays a user action, §0.2 rule 8), and the host's own
|
||||
(`uploads` on the server, `cache-trim` on the desktop). A step that fails fails the job after
|
||||
the others ran.
|
||||
|
||||
Live services are not schedules: they queue no recurring work and change no user data,
|
||||
they keep a connection, a device or the archive's settings current from moment to moment,
|
||||
and they show in their own screens. On the server: the read of archive.json every 10
|
||||
minutes, whatever the scan schedule does (it only takes the settings a desktop sharing the
|
||||
archive wrote, so uploads follow them while scans are pending, rare or off), the
|
||||
render-node monitor and the LAN beacon. On the desktop: the sync agent (the transfers it
|
||||
decides are jobs in the queue), the render node, card and drive detection, the look for an
|
||||
unplugged archive every minute and the update check at start. The log files prune
|
||||
themselves (§14.1).
|
||||
|
||||
### 14.7 Render nodes
|
||||
|
||||
A Chronos client with "Offer this PC as render node" registers its encoder capabilities
|
||||
@@ -1048,12 +1220,29 @@ available and says so in the job log.
|
||||
```
|
||||
|
||||
Pages: Login · Dashboard · Users (table; create/edit/disable/reset/roles/quota) · Archive
|
||||
(path, templates, proxy policy, scan/rebuild/verify, stats) · Jobs (queue/history/nodes,
|
||||
cancel/retry) · Logs (tail, download) and, docked at the foot of the sidebar above the
|
||||
account, Settings (server name, ports, TLS mode + fingerprint, discovery, jobs: parallelism
|
||||
and priority queue, limits, language, retention). The last group of Settings, About, is
|
||||
read-only: version, API version, database and uptime (the server name and the fingerprint
|
||||
are in the groups above); an old `#/about` link opens Settings on it (amended 2026-10-26,
|
||||
(path, templates, proxy policy, scan/rebuild/verify, stats) · Jobs (two tabs in the header,
|
||||
amended 2026-10-26, R10: *Queue*, the queue/history/nodes with cancel/retry, where
|
||||
`#/jobs?job=<id>` opens a job's log and a job a schedule queued carries a *Scheduled* pill
|
||||
linking to it; *Scheduled* (`#/jobs?tab=schedules`), every schedule of the server, its
|
||||
system schedules first and marked System, with when it runs (in the panel's language), its
|
||||
next run and last result (every time on the tab in the server's time zone, named there), an
|
||||
on/off switch, Run now, Edit, and Delete (user schedules) or Reset (system schedules), both
|
||||
confirmed, its runs paged under it, each linking to its job; *New schedule* and Edit open a
|
||||
side panel: name, action (those the server cannot run disabled, the reason in the
|
||||
tooltip), recurrence (interval, daily, weekly, monthly), the action's parameters, priority,
|
||||
catch-up, on; a field the server refuses is marked; the tab follows `scheduleChanged` and
|
||||
`jobState` events, so skipped runs and other administrators' edits appear at once) · Logs
|
||||
(tail, download; schedule changes and runs in words, a system schedule by its name in the
|
||||
panel's language) and, docked at the foot of the sidebar above the account, Settings
|
||||
(server name, ports, TLS mode + fingerprint, discovery, jobs: parallelism and priority
|
||||
queue, limits, language, retention (tokens, uploads; job history is the *Job history
|
||||
clean-up* schedule's age limit, R10), Logs (amended 2026-10-26, R11: file level and console
|
||||
level (Trace…None, default Information), keep logs (days), file size (MB), logs total (MB),
|
||||
rotation (daily or hourly, UTC), keep audit (days; the *Audit log clean-up* schedule's age
|
||||
limit, §14.6), diagnostics logs (MB), applied without a restart)). A field an environment
|
||||
variable fixes is read-only, its tooltip naming that variable (`lockedBy`, §14.3; R11). The
|
||||
last group of Settings, About, is read-only: version, API version, database and uptime (the
|
||||
server name and the fingerprint are in the groups above); an old `#/about` link opens Settings on it (amended 2026-10-26,
|
||||
R4, R5). Same UI rules: tooltips only, light/dark, localised via `/api/v1/i18n`, keyboard
|
||||
accessible. The sidebar is 256 px and collapses to its icons with ≡ or Ctrl+B like the
|
||||
desktop rail, the choice kept in the browser and the links' tooltips then naming their page;
|
||||
@@ -1087,7 +1276,19 @@ it has worked in between; uploads always check the archive's own volume, §14.4)
|
||||
`CHRONOS_TLS_CERT`, `CHRONOS_TLS_KEY`, `CHRONOS_SERVER_NAME`, `CHRONOS_LANG=en`,
|
||||
`CHRONOS_PARALLELISM` (photos the running job processes at once; `CHRONOS_WORKERS`, its former
|
||||
name, still sets it), `CHRONOS_PRIORITY_QUEUE=false`, `CHRONOS_DISCOVERY=true` (LAN UDP beacon),
|
||||
`PUID`, `PGID`, `TZ`. (Amended 2026-10-16, R2; 2026-10-26, R2.)
|
||||
`CHRONOS_LOG_LEVEL` (Trace|Debug|Information|Warning|Error|Critical|None, also `info`,
|
||||
`warn`, `off`; default Information: sets the level of the log files and of the console and
|
||||
locks both in the admin panel), `CHRONOS_LOG_CONSOLE_LEVEL` (the console alone, read after
|
||||
it, so it wins for the console), `CHRONOS_LOG_RETENTION_DAYS=14` (1–3650),
|
||||
`CHRONOS_LOG_MAX_FILE_MB=50` (0–10240, 0 = no limit), `CHRONOS_LOG_MAX_TOTAL_MB=1024`
|
||||
(0–1048576, 0 = no limit, not below the file size), `CHRONOS_LOG_ROTATION=daily|hourly`,
|
||||
`CHRONOS_AUDIT_RETENTION_DAYS=0` (0–3650 days of audit log the *Audit log clean-up*
|
||||
schedule keeps, 0 = forever; set, it is applied to that schedule at every start and locked
|
||||
there), `CHRONOS_DIAGNOSTICS_LOG_MB=4` (1–1024 MB of the end of each log file in the
|
||||
diagnostics zip); in `server.json` `LogLevel` sets the files only and `ConsoleLogLevel` the
|
||||
console; a value out of range stops the start naming it (R11). `PUID`, `PGID`, `TZ` (also
|
||||
the time zone of the schedules, R10). A variable fixes its setting: the admin panel shows
|
||||
it read-only and names the variable. (Amended 2026-10-16, R2; 2026-10-26, R2, R10, R11.)
|
||||
|
||||
Dockerfile: multi-stage on `mcr.microsoft.com/dotnet/sdk:10.0` → `aspnet:10.0`, non-root
|
||||
user via `PUID/PGID` entrypoint, volumes `/archive` and `/data` (the optional read-only
|
||||
@@ -1332,8 +1533,13 @@ pre-release on; amended 2026-10-26, R1), WebUI `http://[IP]:[PORT:8080]/admin`,
|
||||
(*Array view*, read-only, optional: the same share seen on the array only, so the admin
|
||||
panel shows the array's free space, §14.8), `/data` → `/mnt/user/appdata/chronos`,
|
||||
variables from §14.9 (admin user/password, DB host/port/name/user/password, TLS mode,
|
||||
*Space path* `CHRONOS_SPACE_PATH=/space` (advanced), PUID/PGID, TZ; amended 2026-10-26, R2),
|
||||
description ≤ 2 sentences. Registry and Project `https://gitea.encke-hake.ts.net/BalboSoft/Chronos`,
|
||||
*Space path* `CHRONOS_SPACE_PATH=/space` (advanced), PUID/PGID, TZ; amended 2026-10-26, R2;
|
||||
the log variables, *Log level* `CHRONOS_LOG_LEVEL` included, and *Audit retention*
|
||||
`CHRONOS_AUDIT_RETENTION_DAYS` are advanced and empty by default (each description gives
|
||||
the default), so the admin panel's Settings › Logs chooses them; a value given in the
|
||||
template locks its setting; TZ also sets the time zone of the schedules; amended
|
||||
2026-10-26, R10, R11), description ≤ 2 sentences.
|
||||
Registry and Project `https://gitea.encke-hake.ts.net/BalboSoft/Chronos`,
|
||||
Support `https://gitea.encke-hake.ts.net/BalboSoft/Chronos/issues`, TemplateURL
|
||||
`https://gitea.encke-hake.ts.net/BalboSoft/Chronos/raw/branch/main/deploy/unraid/chronos.xml`,
|
||||
Icon `https://gitea.encke-hake.ts.net/BalboSoft/Chronos/raw/branch/main/branding/chronos-server.svg`;
|
||||
@@ -1523,6 +1729,8 @@ questions asked and the answers; DECISIONS rows give the reasons.
|
||||
| 2026-10-26 | Owner review 2, R4 | §12.1, §14.8 | The Settings icon is a toothed gear in Chronos, the Uploader and the admin panel; the admin panel docks Settings at the foot of its sidebar (the end of the top bar on narrow screens). |
|
||||
| 2026-10-26 | Owner review 2, R5 | §12.1, §12.8, §12.9, §14.8 | About is the last page of the desktop Settings and the last group of the admin panel's Settings, no longer a rail or sidebar entry; nothing is offered twice (update check and releases on Updates, data folder and diagnostics on Advanced); `#/about` opens the admin Settings on About. |
|
||||
| 2026-10-26 | Owner review 2, R9 | §12.4, §13 | Import › Folder… can group the folder as *Whole folder*: one sequence per file format whatever the cameras and pauses, titled after the folder, with a session key per PC, folder and format so a repeated import adds to the same sequence; desktop only. |
|
||||
| 2026-10-26 | Owner review 2, R10 | §5, §6.2, §7, §12.5, §12.6, §12.8, §14.3, §14.6, §14.8, §14.9, §19.6 | Scheduled jobs: a Schedule entity (migration 0007, `jobs.schedule_id`) with an in-house recurrence form, a scheduler per host that claims runs by compare-and-set, with catch-up and DST rules; every timer that queued work is a visible system schedule (server: archive scan, upload clean-up every 6 h, index backup at 03:00, job history and audit log clean-ups; desktop: archive scan, daily index backup, housekeeping with cache trim), seeded once and kept as the user edits it; new Backup and Cleanup job kinds and duplicates/orphans report jobs; Jobs has Queue and Scheduled tabs on the desktop and the admin panel; `/api/v1/schedules` and the `scheduleChanged` event; one backup retention; the audit retention is the audit clean-up schedule's; Settings › Archive › Rescan every and the admin Settings' job history are gone; the trash is only reported, never emptied. |
|
||||
| 2026-10-26 | Owner review 2, R11 | §12.8, §14.1, §14.3, §14.8, §14.9, §19.6 | Log settings: file and console levels apart on the server (`CHRONOS_LOG_LEVEL` locks both, `CHRONOS_LOG_CONSOLE_LEVEL` the console), retention, a file size limit with numbered parts, a total size limit, daily or hourly rotation, audit retention and the diagnostics share, in the admin panel's Settings › Logs (applied at once, `lockedBy` naming the variable) and the desktop's Settings › Advanced (from the first log line); the server's files take Debug and Trace when asked; logging never fails a job. |
|
||||
|
||||
## Appendix A — `CLAUDE.md` content (create verbatim in Phase 0, keep updated)
|
||||
|
||||
|
||||
Reference in new issue
Block a user