updateSpec.getNonTransactionalGroup().includeJob(jobRecord);
updateSpec.getNonTransactionalGroup().includeJob(rootJobRecord);
backEnd.save(updateSpec);
int backoffFactor = jobRecord.getBackoffFactor();
int backoffSeconds = jobRecord.getBackoffSeconds();
Task task = new RunJobTask(jobRecord.getKey(), attemptNumber);
task.setDelaySeconds(backoffSeconds * (long) Math.pow(backoffFactor, attemptNumber));
task.setOnBackend(jobRecord.getOnBackend());
backEnd.enqueue(task);
}
logger.log(Level.SEVERE, "An exception occurred while attempting to run " + jobRecord + ". "
+ "This was attempt number " + attemptNumber + " of " + maxAttempts + ".", e);