CUB-8: Create background service for Moonraker mapping #29
Reference in New Issue
Block a user
Delete Branch "agent/dex/CUB-8-background-service-moonraker"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Creates a background service that periodically polls Moonraker printers and maps printer status + print job history into the Extrudex database.
Changes
MoonrakerPrinterSync(polling interval, timeout, enabled, history batch size)GetPrinterInfoAsync+GetPrintStatsAsync, maps print history toPrintJobandFilamentUsageentities with derived grams calculationBackgroundServicehost that runs the sync on a configurable intervalKey design decisions
print_stats.state(authoritative) with fallback toprinter_info.statemoonraker:<id>inGcodeFilePathfor dedupMaterialBaseLinear
Closes CUB-8
APPROVED — base=dev, author=Dex, 6 files (+473), dotnet build PASS 0 errors, Closes CUB-8 present. Great architecture: options pattern, IHostedService, configurable polling, clean DTO mapping.