Skip to content

Commit 3a188ee

Browse files
author
To-om
committed
#14 Don't run analyzer on case merging
1 parent cca0d05 commit 3a188ee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

thehive-backend/app/services/JobSrv.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ class JobSrv(analyzerConf: JsValue,
6767

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

@@ -122,4 +122,4 @@ class JobSrv(analyzerConf: JsValue,
122122
}
123123

124124
def stats(queryDef: QueryDef, agg: Agg) = findSrv(jobModel, queryDef, agg)
125-
}
125+
}

0 commit comments

Comments
 (0)