Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mirrors
biopet.biopet
Commits
90c4e1cb
Commit
90c4e1cb
authored
Mar 31, 2017
by
Peter van 't Hof
Browse files
Added a basefile future
parent
e91e3f4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/report/ReportBuilder.scala
View file @
90c4e1cb
...
...
@@ -187,20 +187,21 @@ trait ReportBuilder extends ToolCommand {
_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
)
// TODO: switch to future for 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
val
extOutputDir
:
File
=
new
File
(
cmdArgs
.
outputDir
,
"ext"
)
// Copy each resource files out to the report destination
extFiles
.
par
.
foreach
(
resource
=>
IoUtils
.
copyStreamToFile
(
getClass
.
getResourceAsStream
(
resource
.
resourcePath
),
new
File
(
extOutputDir
,
resource
.
targetPath
),
createDirs
=
true
)
)
val
baseFilesFuture
=
Future
{
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
val
extOutputDir
:
File
=
new
File
(
cmdArgs
.
outputDir
,
"ext"
)
// Copy each resource files out to the report destination
extFiles
.
foreach
(
resource
=>
IoUtils
.
copyStreamToFile
(
getClass
.
getResourceAsStream
(
resource
.
resourcePath
),
new
File
(
extOutputDir
,
resource
.
targetPath
),
createDirs
=
true
)
)
}
val
rootPage
=
indexPage
...
...
@@ -215,6 +216,7 @@ trait ReportBuilder extends ToolCommand {
Map
(
"summary"
->
summary
,
"reportName"
->
reportName
,
"indexPage"
->
rootPage
,
"runId"
->
cmdArgs
.
runId
))
Await
.
result
(
jobs
,
Duration
.
Inf
)
Await
.
result
(
baseFilesFuture
,
Duration
.
Inf
)
}
/** This must be implemented, this will be the root page of the report */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment