Commit 134e9302 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Added wait step for executable

parent f96791cb
......@@ -121,7 +121,7 @@ trait SummaryQScript extends BiopetQScript { qscript: QScript =>
private def createRun(): Int = {
val db = SummaryDb.openSqliteSummary(summaryDbFile)
val dir = root match {
case q:BiopetQScript => q.outputDir
case q: BiopetQScript => q.outputDir
case _ => throw new IllegalStateException("Root should be a BiopetQscript")
}
val id = Await.result(db.createRun(summaryName, dir.getAbsolutePath), Duration.Inf)
......
......@@ -164,23 +164,16 @@ class WriteSummary(val parent: SummaryQScript) extends InProcessFunction with Co
db.createOrUpdateSetting(qscript.summaryRunId, pipelineId, None, None, None, ConfigUtils.mapToJson(q.summarySettings).nospaces)
}
for (
(name, f) <- qscript.functions.flatMap(_ match {
case c: Configurable with Version => Some(c)
case _ => None
}).groupBy(_.configNamespace)
) yield {
f match {
(for (f <- qscript.functions.par) yield f match {
case f: BiopetJavaCommandLineFunction with Version =>
db.createOrUpdateExecutable(qscript.summaryRunId, name, f.getVersion, f.getJavaVersion, javaMd5 = BiopetCommandLineFunction.executableMd5Cache.get(f.executable), jarPath = Some(f.jarFile.getAbsolutePath))
Some(db.createOrUpdateExecutable(qscript.summaryRunId, f.configNamespace, f.getVersion, f.getJavaVersion,
javaMd5 = BiopetCommandLineFunction.executableMd5Cache.get(f.executable), jarPath = Some(f.jarFile.getAbsolutePath)))
case f: BiopetCommandLineFunction with Version =>
db.createOrUpdateExecutable(qscript.summaryRunId, name, f.getVersion, Option(f.executable))
Some(db.createOrUpdateExecutable(qscript.summaryRunId, f.configNamespace, f.getVersion, Option(f.executable)))
case f: Configurable with Version =>
db.createOrUpdateExecutable(qscript.summaryRunId, name, f.getVersion)
Some(db.createOrUpdateExecutable(qscript.summaryRunId, f.configNamespace, f.getVersion))
case _ => None
}
}
}).flatten.foreach(Await.ready(_, Duration.Inf))
///////////////// OLD //////////////////
for (((name, sampleId, libraryId), summarizables) <- qscript.summarizables; summarizable <- summarizables) {
......
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