Skip to content

Commit

Permalink
maybe fix cache
Browse files Browse the repository at this point in the history
  • Loading branch information
mcovarr committed Aug 3, 2018
1 parent 578a30e commit 411c5e8
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package languages.wdl.draft2

import java.security.MessageDigest
import java.util.concurrent.{Callable, TimeUnit}

import cats.data.EitherT.fromEither
Expand Down Expand Up @@ -57,7 +58,11 @@ class WdlDraft2LanguageFactory(override val config: Map[String, Any]) extends La
list.sequence[Checked, Unit].void
}

lazy val wdlNamespaceValidation: ErrorOr[WdlNamespaceWithWorkflow] = namespaces.get(workflowSource.md5Sum, new Callable[ErrorOr[WdlNamespaceWithWorkflow]] {
def workflowHashKey: String = {
workflowSource.md5Sum + (source.importsZipFileOption map { bytes => new String(MessageDigest.getInstance("MD5").digest(bytes)) }).getOrElse("")
}

lazy val wdlNamespaceValidation: ErrorOr[WdlNamespaceWithWorkflow] = namespaces.get(workflowHashKey, new Callable[ErrorOr[WdlNamespaceWithWorkflow]] {
def call: ErrorOr[WdlNamespaceWithWorkflow] = source match {
case w: WorkflowSourceFilesWithDependenciesZip =>
for {
Expand Down

0 comments on commit 411c5e8

Please sign in to comment.