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:
@@ -28,6 +28,25 @@ ZAMMAD_PASSWORD = os.getenv("ZAMMAD_PASSWORD", "")
|
||||
# --- Abruf ---
|
||||
POLL_INTERVAL_SECONDS = int(os.getenv("POLL_INTERVAL_SECONDS", "180"))
|
||||
|
||||
# --- EPIRent-Versionsüberwachung (Download-Seite) ---
|
||||
EPIRENT_CHECK_ENABLED = _b(os.getenv("EPIRENT_CHECK_ENABLED"), True)
|
||||
EPIRENT_URL = os.getenv("EPIRENT_URL", "https://www.epi.rent/downloads")
|
||||
EPIRENT_CHECK_INTERVAL_SECONDS = int(
|
||||
os.getenv("EPIRENT_CHECK_INTERVAL_SECONDS", "1800"))
|
||||
|
||||
# --- Download-Archiv (pro Version zwischengespeichert) ---
|
||||
EPIRENT_DOWNLOAD_ENABLED = _b(os.getenv("EPIRENT_DOWNLOAD_ENABLED"), True)
|
||||
EPIRENT_DOWNLOAD_URLS = [
|
||||
u.strip() for u in os.getenv(
|
||||
"EPIRENT_DOWNLOAD_URLS",
|
||||
"https://download.epi.rent/latest/epirentServer.zip,"
|
||||
"https://download.epi.rent/latest/epirentClient.zip"
|
||||
).split(",") if u.strip()
|
||||
]
|
||||
# Wie viele Versionsstände aufbewahrt werden (je ~1,1 GB!).
|
||||
# 0 = unbegrenzt aufbewahren (es wird nichts automatisch gelöscht).
|
||||
EPIRENT_DOWNLOAD_KEEP = int(os.getenv("EPIRENT_DOWNLOAD_KEEP", "3"))
|
||||
|
||||
# --- Web ---
|
||||
URL_PREFIX = os.getenv("EPISUPPORT_URL_PREFIX", "/episupport").rstrip("/")
|
||||
PORT = int(os.getenv("EPISUPPORT_PORT", "8071"))
|
||||
|
||||
Reference in New Issue
Block a user