tmp.fromSchedule = rs.getBoolean(21); tmp.priority = rs.getInt(22); tmp.instruction = Instruction.valueOf(rs.getString(23)); tmp.notBefore = cnx.getCal(rs, 24);
@Override public void run() { Thread.currentThread().setName("JQM single runner;killerloop;" + jobId); DbConn cnx = null; while (!Thread.interrupted()) { cnx = Helpers.getNewDbSession(); com.enioka.jqm.model.JobInstance job = com.enioka.jqm.model.JobInstance.select_id(cnx, jobId); cnx.close(); if (job != null && job.getInstruction().equals(com.enioka.jqm.model.Instruction.KILL)) { jqmlogger.debug( "Job " + jobId + " has received a kill order. It's JVM will be killed after a grace shutdown period"); System.exit(1); // Launch the exit hook. break; } try { Thread.sleep(poll); } catch (InterruptedException e) { break; } } } };
tmp.fromSchedule = rs.getBoolean(21); tmp.priority = rs.getInt(22); tmp.instruction = Instruction.valueOf(rs.getString(23)); tmp.notBefore = cnx.getCal(rs, 24);
@Override public void run() { Thread.currentThread().setName("JQM single runner;killerloop;" + jobId); DbConn cnx = null; while (!Thread.interrupted()) { cnx = Helpers.getNewDbSession(); com.enioka.jqm.model.JobInstance job = com.enioka.jqm.model.JobInstance.select_id(cnx, jobId); cnx.close(); if (job != null && job.getInstruction().equals(com.enioka.jqm.model.Instruction.KILL)) { jqmlogger.debug( "Job " + jobId + " has received a kill order. It's JVM will be killed after a grace shutdown period"); System.exit(1); // Launch the exit hook. break; } try { Thread.sleep(poll); } catch (InterruptedException e) { break; } } } };
try instruction = Instruction.valueOf(instr);
try instruction = Instruction.valueOf(instr);