Class MetricsExportTask

All Implemented Interfaces:
ExtensionPoint, Runnable

@Extension public class MetricsExportTask extends AsyncPeriodicWork
Checks every hour whether the export interval has passed since the last export that went through and, if so, exports every build that finished since then. A failed export leaves that moment where it was, so the next hour tries the same window again and nothing is lost. The moment is kept on disk, so a restart neither exports again early nor skips a window.

Kept apart from MetricsMaintenanceTask so that retention does not wait on an export endpoint.