@Override public String sessionID() { return this.ji.getSessionID(); }
@Override public String sessionID() { return this.ji.getSessionID(); }
@Override public String getSessionId() { return this.ji.getSessionID(); }
@Override public String getSessionId() { return this.job.getSessionID(); }
@Override public String getSessionId() { return this.ji.getSessionID(); }
static void sendEndMessage(JobInstance ji) { try { String message = "The Job number " + ji.getId() + " finished correctly\n\n" + "Job description:\n" + "\n" + "- Parent: " + ji.getParentId() + "\n" + "- User name: " + ji.getUserName() + "\n" + "- Session ID: " + ji.getSessionID() + "\n" + "\n" + "Best regards,\n"; sendMessage(ji.getEmail(), "[JQM] Job: " + ji.getId() + " ENDED", message, "mail/default"); } catch (Exception e) { jqmlogger.warn("Could not send email. Job has nevertheless run correctly", e); } }
static void sendEndMessage(JobInstance ji) { try { String message = "The Job number " + ji.getId() + " finished correctly\n\n" + "Job description:\n" + "\n" + "- Parent: " + ji.getParentId() + "\n" + "- User name: " + ji.getUserName() + "\n" + "- Session ID: " + ji.getSessionID() + "\n" + "\n" + "Best regards,\n"; sendMessage(ji.getEmail(), "[JQM] Job: " + ji.getId() + " ENDED", message, "mail/default"); } catch (Exception e) { jqmlogger.warn("Could not send email. Job has nevertheless run correctly", e); } }
@Override public Integer enqueue(String applicationName, String user, String mail, String sessionId, String application, String module, String keyword1, String keyword2, String keyword3, Map<String, String> parameters) { JobRequest jr = new JobRequest(applicationName, user, mail); jr.setApplicationName(applicationName); jr.setUser(user == null ? ji.getUserName() : user); jr.setEmail(mail); jr.setSessionID(sessionId == null ? this.ji.getSessionID() : sessionId); jr.setApplication(application == null ? this.ji.getJD().getApplication() : application); jr.setModule(module == null ? this.ji.getJD().getModule() : module); jr.setKeyword1(keyword1); jr.setKeyword2(keyword2); jr.setKeyword3(keyword3); jr.setParentID(this.ji.getId()); if (parameters != null) { jr.setParameters(parameters); } return getJqmClient().enqueue(jr); }
@Override public Integer enqueue(String applicationName, String user, String mail, String sessionId, String application, String module, String keyword1, String keyword2, String keyword3, Map<String, String> parameters) { JobRequest jr = new JobRequest(applicationName, user, mail); jr.setApplicationName(applicationName); jr.setUser(user == null ? ji.getUserName() : user); jr.setEmail(mail); jr.setSessionID(sessionId == null ? this.ji.getSessionID() : sessionId); jr.setApplication(application == null ? this.ji.getJD().getApplication() : application); jr.setModule(module == null ? this.ji.getJD().getModule() : module); jr.setKeyword1(keyword1); jr.setKeyword2(keyword2); jr.setKeyword3(keyword3); jr.setParentID(this.ji.getId()); if (parameters != null) { jr.setParameters(parameters); } return getJqmClient().enqueue(jr); }
/** * Create an History object from a {@link JobInstance}. * */ public static void create(DbConn cnx, JobInstance ji, State finalState, Calendar endDate) { JobDef jd = ji.getJD(); Node n = ji.getNode(); Queue q = ji.getQ(); if (endDate == null) { cnx.runUpdate("history_insert", ji.getId(), jd.getApplication(), jd.getApplicationName(), ji.getAttributionDate(), ji.getEmail(), ji.getCreationDate(), ji.getExecutionDate(), jd.isHighlander(), ji.getApplication(), ji.getKeyword1(), ji.getKeyword2(), ji.getKeyword3(), ji.getModule(), jd.getKeyword1(), jd.getKeyword2(), jd.getKeyword3(), jd.getModule(), n == null ? null : n.getName(), ji.getParentId(), ji.getProgress(), q == null ? null : q.getName(), 0, ji.getSessionID(), finalState.toString(), ji.getUserName(), ji.getJdId(), n == null ? null : n.getId(), ji.getQueue(), ji.isFromSchedule(), ji.getPriority()); } else { cnx.runUpdate("history_insert_with_end_date", ji.getId(), jd.getApplication(), jd.getApplicationName(), ji.getAttributionDate(), ji.getEmail(), endDate, ji.getCreationDate(), ji.getExecutionDate(), jd.isHighlander(), ji.getApplication(), ji.getKeyword1(), ji.getKeyword2(), ji.getKeyword3(), ji.getModule(), jd.getKeyword1(), jd.getKeyword2(), jd.getKeyword3(), jd.getModule(), n.getName(), ji.getParentId(), ji.getProgress(), q.getName(), 0, ji.getSessionID(), finalState.toString(), ji.getUserName(), ji.getJdId(), ji.getNode().getId(), ji.getQueue(), ji.isFromSchedule(), ji.getPriority()); } }
/** * Create an History object from a {@link JobInstance}. * */ public static void create(DbConn cnx, JobInstance ji, State finalState, Calendar endDate) { JobDef jd = ji.getJD(); Node n = ji.getNode(); Queue q = ji.getQ(); if (endDate == null) { cnx.runUpdate("history_insert", ji.getId(), jd.getApplication(), jd.getApplicationName(), ji.getAttributionDate(), ji.getEmail(), ji.getCreationDate(), ji.getExecutionDate(), jd.isHighlander(), ji.getApplication(), ji.getKeyword1(), ji.getKeyword2(), ji.getKeyword3(), ji.getModule(), jd.getKeyword1(), jd.getKeyword2(), jd.getKeyword3(), jd.getModule(), n == null ? null : n.getName(), ji.getParentId(), ji.getProgress(), q == null ? null : q.getName(), 0, ji.getSessionID(), finalState.toString(), ji.getUserName(), ji.getJdId(), n == null ? null : n.getId(), ji.getQueue(), ji.isFromSchedule(), ji.getPriority()); } else { cnx.runUpdate("history_insert_with_end_date", ji.getId(), jd.getApplication(), jd.getApplicationName(), ji.getAttributionDate(), ji.getEmail(), endDate, ji.getCreationDate(), ji.getExecutionDate(), jd.isHighlander(), ji.getApplication(), ji.getKeyword1(), ji.getKeyword2(), ji.getKeyword3(), ji.getModule(), jd.getKeyword1(), jd.getKeyword2(), jd.getKeyword3(), jd.getModule(), n.getName(), ji.getParentId(), ji.getProgress(), q.getName(), 0, ji.getSessionID(), finalState.toString(), ji.getUserName(), ji.getJdId(), ji.getNode().getId(), ji.getQueue(), ji.isFromSchedule(), ji.getPriority()); } }