Skip to content

Commit

Permalink
#14 Don't run analyzer on case merging
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Nov 21, 2016
1 parent cca0d05 commit 3a188ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions thehive-backend/app/services/JobSrv.scala
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ class JobSrv(analyzerConf: JsValue,

def create(artifact: Artifact, fields: Fields)(implicit authContext: AuthContext): Future[Job] = {
createSrv[JobModel, Job, Artifact](jobModel, artifact, fields.set("artifactId", artifact.id)).map {
case job if job.status() != JobStatus.InProgress => job
case job =>
case job if job.status() == JobStatus.InProgress =>
val newJob = for {
analyzer <- analyzerSrv.get(job.analyzerId())
(status, result) <- analyzer.analyze(attachmentSrv, artifact)
Expand All @@ -83,6 +82,7 @@ class JobSrv(analyzerConf: JsValue,
case t => log.error("Job execution fail", t)
}
job
case job => job
}
}

Expand Down Expand Up @@ -122,4 +122,4 @@ class JobSrv(analyzerConf: JsValue,
}

def stats(queryDef: QueryDef, agg: Agg) = findSrv(jobModel, queryDef, agg)
}
}

0 comments on commit 3a188ee

Please sign in to comment.