Promise that resolves when aggregation completes
// Trigger manual update with error handling
try {
await triggerManualAggregation();
showSuccessMessage();
} catch (error) {
showErrorMessage(error);
}
export async function triggerManualAggregation(): Promise<void> {
try {
saveLog("Manually triggering skip metrics aggregation", "INFO");
await runAggregation();
saveLog("Manual aggregation completed successfully", "INFO");
} catch (error) {
saveLog(`Error during manual skip metrics aggregation: ${error}`, "ERROR");
throw error;
}
}
Manually triggers a metrics aggregation
Forces an immediate execution of the complete aggregation process outside of the scheduled interval. Useful for:
The function runs the same comprehensive aggregation process as the scheduled background task but executes immediately and provides detailed error information if aggregation fails.