Commit 90c4e1cb authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Added a basefile future

parent e91e3f4c
...@@ -187,20 +187,21 @@ trait ReportBuilder extends ToolCommand { ...@@ -187,20 +187,21 @@ trait ReportBuilder extends ToolCommand {
_setSamples = Await.result(summary.getSamples(runId = Some(runId), sampleId = sampleId), Duration.Inf) _setSamples = Await.result(summary.getSamples(runId = Some(runId), sampleId = sampleId), Duration.Inf)
_setLibraries = Await.result(summary.getLibraries(runId = Some(runId), sampleId = sampleId, libId = libId), Duration.Inf) _setLibraries = Await.result(summary.getLibraries(runId = Some(runId), sampleId = sampleId, libId = libId), Duration.Inf)
// TODO: switch to future for base files val baseFilesFuture = Future {
logger.info("Copy Base files") logger.info("Copy Base files")
// Static files that will be copied to the output folder, then file is added to [resourceDir] it's need to be added here also // Static files that will be copied to the output folder, then file is added to [resourceDir] it's need to be added here also
val extOutputDir: File = new File(cmdArgs.outputDir, "ext") val extOutputDir: File = new File(cmdArgs.outputDir, "ext")
// Copy each resource files out to the report destination // Copy each resource files out to the report destination
extFiles.par.foreach( extFiles.foreach(
resource => resource =>
IoUtils.copyStreamToFile( IoUtils.copyStreamToFile(
getClass.getResourceAsStream(resource.resourcePath), getClass.getResourceAsStream(resource.resourcePath),
new File(extOutputDir, resource.targetPath), new File(extOutputDir, resource.targetPath),
createDirs = true) createDirs = true)
) )
}
val rootPage = indexPage val rootPage = indexPage
...@@ -215,6 +216,7 @@ trait ReportBuilder extends ToolCommand { ...@@ -215,6 +216,7 @@ trait ReportBuilder extends ToolCommand {
Map("summary" -> summary, "reportName" -> reportName, "indexPage" -> rootPage, "runId" -> cmdArgs.runId)) Map("summary" -> summary, "reportName" -> reportName, "indexPage" -> rootPage, "runId" -> cmdArgs.runId))
Await.result(jobs, Duration.Inf) Await.result(jobs, Duration.Inf)
Await.result(baseFilesFuture, Duration.Inf)
} }
/** This must be implemented, this will be the root page of the report */ /** This must be implemented, this will be the root page of the report */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment