Edits history of script submission #401 for ' Schedule error handler template (windmill)'

  • deno
    // 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 959 days ago

  • deno
    // 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 959 days ago

  • deno
    // 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 1018 days ago

  • deno
    // 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 1029 days ago

  • deno
    // 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 1067 days ago