Example #1
0
 @Override
 public void pushTaskLog(final String taskid, File file) throws IOException {
   if (!config.getDirectory().exists()) {
     config.getDirectory().mkdir();
   }
   final File outputFile = fileForTask(taskid);
   Files.copy(file, outputFile);
   log.info("Wrote task log to: %s", outputFile);
 }
Example #2
0
 @Override
 public void pushTaskLog(final String taskid, File file) throws IOException {
   if (config.getDirectory().exists() || config.getDirectory().mkdirs()) {
     final File outputFile = fileForTask(taskid);
     Files.copy(file, outputFile);
     log.info("Wrote task log to: %s", outputFile);
   } else {
     throw new IOException(
         String.format("Unable to create task log dir[%s]", config.getDirectory()));
   }
 }
Example #3
0
 private File fileForTask(final String taskid) {
   return new File(config.getDirectory(), String.format("%s.log", taskid));
 }