INNER CODE UNIT · JavaScript

handleJobStatusChange

microsoft/pai · src/alert-manager/src/job-status-change-notification/index.js:21

const handleJobStatusChange = async (framework) => {
  // each framework may have multiple state change alerts
  const infos = [];
  logger.info(`Handling job state change of job ${framework.jobName} ...`);
  if (
    framework.notificationAtRunning &&
    !framework.notifiedAtRunning &&
    ["RUNNING", "SUCCEEDED"].includes(framework.state)
  ) {
    infos.push({
      stateToNotify: "RUNNING",
      fieldToUpdate: "notifiedAtRunning",
      valToUpdate: true,
    });
  }
  if (
    framework.notificationAtSucceeded &&
    !framework.notifiedAtSucceeded &&

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…