Пример #1
0
 @Override
 public synchronized Job createJob(List<CliToken> args) {
   StringBuilder line = new StringBuilder();
   args.stream().map(CliToken::raw).forEach(line::append);
   Process process = commandManager.createProcess(args);
   return jobController.createJob(process, line.toString());
 }
Пример #2
0
 private String statusLine(Job job, ExecStatus status) {
   StringBuilder sb = new StringBuilder("[").append(job.id()).append("]");
   if (findJob() == job) {
     sb.append("+");
   }
   sb.append(" ")
       .append(Character.toUpperCase(status.name().charAt(0)))
       .append(job.status().name().substring(1).toLowerCase());
   sb.append(" ").append(job.line());
   return sb.toString();
 }