Commit 7eb3ecdb authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Report builder in now in parallel

parent 51d189aa
......@@ -4,7 +4,7 @@ import java.io.{ PrintWriter, File }
import nl.lumc.sasc.biopet.core.ToolCommand
import nl.lumc.sasc.biopet.core.summary.Summary
import org.fusesource.scalate.TemplateEngine
import org.fusesource.scalate.{ TemplateSource, TemplateEngine }
import scala.io.Source
......@@ -90,7 +90,7 @@ trait ReportBuilder extends ToolCommand {
writer.close()
// Generating subpages
for ((name, subPage) <- page.subPages) {
for ((name, subPage) <- page.subPages.par) {
generatePage(summary, subPage, outputDir, path ::: name :: Nil, pageArgs)
}
}
......@@ -101,9 +101,6 @@ object ReportBuilder {
protected val engine = new TemplateEngine()
def renderTemplate(location: String, args: Map[String, Any]): String = {
val templateText = Source.fromInputStream(getClass.getResourceAsStream(location)).getLines().mkString("\n")
val template = engine.compileText("ssp", templateText)
engine.layout(template.source, args)
engine.layout(TemplateSource.fromFile(getClass.getResource(location).getPath), args)
}
}
\ No newline at end of file
Supports Markdown
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