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
2295a711
Commit
2295a711
authored
Dec 07, 2016
by
Peter van 't Hof
Browse files
Done intermediates will now travers
parent
2844eee6
Changes
1
Hide whitespace changes
Inline
Side-by-side
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/PipelineStatus.scala
View file @
2295a711
...
...
@@ -141,8 +141,18 @@ object PipelineStatus extends ToolCommand {
}
def
jobsDone
(
jobs
:
Map
[
String
,
Job
])
:
Map
[
String
,
Boolean
]
=
{
val
f
=
jobs
.
map
(
x
=>
x
.
_1
->
x
.
_2
.
isDone
)
f
.
map
(
x
=>
x
.
_1
->
Await
.
result
(
x
.
_2
,
Duration
.
Inf
))
val
f
=
jobs
.
map
(
x
=>
x
.
_2
->
x
.
_2
.
isDone
)
val
dones
=
f
.
map
(
x
=>
x
.
_1
->
Await
.
result
(
x
.
_2
,
Duration
.
Inf
))
val
f2
=
f
.
map
(
x
=>
x
.
_1
->
x
.
_2
.
map
{
d
=>
if
(
d
||
!
x
.
_1
.
intermediate
)
d
else
upstreamJobDone
(
x
.
_1
,
dones
,
jobs
)
})
f2
.
map
(
x
=>
x
.
_1
.
name
->
Await
.
result
(
x
.
_2
,
Duration
.
Inf
))
}
private
def
upstreamJobDone
(
job
:
Job
,
dones
:
Map
[
Job
,
Boolean
],
allJobs
:
Map
[
String
,
Job
])
:
Boolean
=
{
job
.
outputUsedByJobs
.
map
(
allJobs
)
.
exists
(
x
=>
dones
(
x
)
||
(
x
.
intermediate
&&
upstreamJobDone
(
x
,
dones
,
allJobs
)))
}
def
jobsFailed
(
jobs
:
Map
[
String
,
Job
])
:
Map
[
String
,
Boolean
]
=
{
...
...
@@ -161,7 +171,7 @@ object PipelineStatus extends ToolCommand {
def
stdoutFile
=
new
File
(
ConfigUtils
.
any2string
(
map
(
"stdout_file"
)))
def
outputsFiles
=
ConfigUtils
.
any2fileList
(
map
(
"outputs"
))
def
I
nputFiles
=
ConfigUtils
.
any2fileList
(
map
(
"inputs"
))
def
i
nputFiles
=
ConfigUtils
.
any2fileList
(
map
(
"inputs"
))
def
mainJob
=
ConfigUtils
.
any2boolean
(
map
(
"main_job"
))
def
intermediate
=
ConfigUtils
.
any2boolean
(
map
(
"intermediate"
))
...
...
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