protected final void notifyUserStatusChange(ExecutableContext context, ExecutableState state) { try { List<String> users = getAllNofifyUsers(config); if (users.isEmpty()) { logger.debug(NO_NEED_TO_SEND_EMAIL_USER_LIST_IS_EMPTY); return; } final Pair<String, String> email = formatNotifications(context, state); doSendMail(config, users, email); } catch (Exception e) { logger.error("error send email", e); } }
protected final void notifyUserStatusChange(ExecutableState state) { try { List<String> users = Lists.newArrayList(); users.addAll(getNotifyList()); final String adminDls = KylinConfig.getInstanceFromEnv().getAdminDls(); if (null != adminDls) { for (String adminDl : adminDls.split(",")) { users.add(adminDl); } } if (users.isEmpty()) { return; } final Pair<String, String> email = formatNotifications(state); if (email == null) { return; } logger.info("prepare to send email to:" + users); logger.info("job name:" + getName()); logger.info("submitter:" + getSubmitter()); logger.info("notify list:" + users); new MailService().sendMail(users, email.getLeft(), email.getRight()); } catch (Exception e) { logger.error(e.getLocalizedMessage(), e); } }
protected final void notifyUserStatusChange(ExecutableContext context, ExecutableState state) { try { List<String> users = getAllNofifyUsers(config); if (users.isEmpty()) { logger.debug(NO_NEED_TO_SEND_EMAIL_USER_LIST_IS_EMPTY); return; } final Pair<String, String> email = formatNotifications(context, state); doSendMail(config, users, email); } catch (Exception e) { logger.error("error send email", e); } }
protected final void notifyUserStatusChange(ExecutableState state) { try { List<String> users = Lists.newArrayList(); users.addAll(getNotifyList()); final String adminDls = KylinConfig.getInstanceFromEnv().getAdminDls(); if (null != adminDls) { for (String adminDl : adminDls.split(",")) { users.add(adminDl); } } if (users.isEmpty()) { return; } final Pair<String, String> email = formatNotifications(state); if (email == null) { return; } logger.info("prepare to send email to:" + users); logger.info("job name:" + getName()); logger.info("submitter:" + getSubmitter()); logger.info("notify list:" + users); new MailService().sendMail(users, email.getLeft(), email.getRight()); } catch (Exception e) { logger.error(e.getLocalizedMessage(), e); } }