// Schedule error handler template
export async function main(
path: string, // The path of the script or flow that errored
is_flow: boolean, // Whether the runnable is a flow
schedule_path: string, // The path of the schedule
error: object, // The error details
started_at: string, // The start datetime of the latest job that failed
failed_times: number // Minimum number of times the schedule failed before calling the error handler
) {
console.log(
`Schedule ${schedule_path} failed ${
failed_times > 1 ? failed_times + " times in a row" : ""
}\n${is_flow ? "Flow" : "Script"}: ${path}`
);
console.log(`Last failure at ${started_at}:`, error);
return error;
}
Submitted by rubenfiszel 410 days ago
// Schedule error handler template
export async function main(
path: string, // The path of the script or flow that errored
is_flow: boolean, // Whether the runnable is a flow
schedule_path: string, // The path of the schedule
error: object, // The error details
started_at: string, // The start datetime of the latest job that failed
failed_times: number, // Minimum number of times the schedule failed before calling the error handler
) {
console.log(
`Schedule ${schedule_path} failed ${
failed_times > 1 ? failed_times + " times in a row" : ""
}\n${is_flow ? "Flow" : "Script"}: ${path}`,
);
console.log(`Last failure at ${started_at}:`, error);
return error;
}
Submitted by admin 410 days ago
// Schedule error handler template
export async function main(
path: string, // The path of the script or flow that errored
is_flow: boolean, // Whether the runnable is a flow
schedule_path: string, // The path of the schedule
error: object, // The error details
started_at: string, // The start datetime of the latest job that failed
failed_times: number, // Minimum number of times the schedule failed before calling the error handler
) {
console.log(
`Schedule ${schedule_path} failed ${
failed_times > 1 ? (failed_times + " times in a row") : ""
}\n${is_flow ? "Flow" : "Script"}: ${path}`,
);
console.log(`Last failure at ${started_at}:`, error);
return error;
}
Submitted by hugo697 469 days ago
// Schedule error handler template
export async function main(
path: string, // The path of the script or flow that errored
schedule_path: string, // The path of the schedule
error: object, // The error details
) {
console.log(`Schedule ${schedule_path} failed (script or flow: ${path})`);
console.log(error);
return error;
}
Submitted by admin 480 days ago
// Schedule error handler template
export async function main(
path: string, // The path of the script or flow that errored
schedule_path: string, // The path of the schedule
error: object, // The error details
) {
console.log(
`Schedule ${schedule_path} failed (script or flow: ${path})`,
);
console.log(error);
return error;
}
Submitted by hugo697 518 days ago