Watch EPIRent version and archive its download packages
- Poll the public download page for "Aktuelle Version <nr> vom <date>", report changes through the normal change feed and notification mail, and show the current version as a card on the overview. Runs on its own interval (default 30 min); the first run only records a baseline. - Archive epirentServer.zip / epirentClient.zip per version number so we keep a download cache and history: streamed to disk with SHA-256 and size, fetched in a background thread so ticket polling is unaffected, with a free-space check before downloading (~1.1 GB per version). - Retention is configurable via EPIRENT_DOWNLOAD_KEEP, where 0 means unlimited; a successful archive is reported as a change and by mail. - New Downloads page listing the archived versions with checksums and links to fetch the cached files. - Notification lines now omit the arrow when there is no previous value and drop the "#" for entries without a ticket. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -70,6 +70,28 @@ CREATE TABLE IF NOT EXISTS articles (
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_articles_ticket ON articles(ticket_id, created_at);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS versions (
|
||||
source TEXT PRIMARY KEY,
|
||||
version TEXT,
|
||||
released_at TEXT,
|
||||
checked_at TEXT,
|
||||
updated_at TEXT
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS downloads (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
version TEXT NOT NULL,
|
||||
filename TEXT NOT NULL,
|
||||
url TEXT,
|
||||
size INTEGER,
|
||||
sha256 TEXT,
|
||||
remote_modified TEXT,
|
||||
downloaded_at TEXT,
|
||||
UNIQUE(version, filename)
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_downloads_version ON downloads(version);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS sync_runs (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
started_at TEXT,
|
||||
|
||||
Reference in New Issue
Block a user