Skip to content

Commit

Permalink
Revive segment index migration route (#7750)
Browse files Browse the repository at this point in the history
  • Loading branch information
fm3 authored Apr 15, 2024
1 parent 7b13f15 commit d7da22e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/models/annotation/Annotation.scala
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class AnnotationLayerDAO @Inject()(SQLClient: SqlClient)(implicit ec: ExecutionC
def findAllVolumeLayers: Fox[List[AnnotationLayer]] =
for {
rows <- run(
q"select _annotation, tracingId, typ, name from webknossos.annotation_layers where typ = 'Volume'"
q"select _annotation, tracingId, typ, name, statistics from webknossos.annotation_layers where typ = 'Volume'"
.as[AnnotationLayersRow])
parsed <- Fox.serialCombined(rows.toList)(parse)
} yield parsed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -922,9 +922,10 @@ class VolumeTracingService @Inject()(
def checkIfSegmentIndexMayBeAdded(tracingId: String, tracing: VolumeTracing, userToken: Option[String])(
implicit ec: ExecutionContext): Fox[Boolean] =
for {
fallbackLayer <- remoteFallbackLayerFromVolumeTracing(tracing, tracingId)
fallbackLayerOpt <- Fox.runIf(tracing.fallbackLayer.isDefined)(
remoteFallbackLayerFromVolumeTracing(tracing, tracingId))
canHaveSegmentIndex <- VolumeSegmentIndexService.canHaveSegmentIndex(remoteDatastoreClient,
Some(fallbackLayer),
fallbackLayerOpt,
userToken)
alreadyHasSegmentIndex = tracing.hasSegmentIndex.getOrElse(false)
} yield canHaveSegmentIndex && !alreadyHasSegmentIndex
Expand Down

0 comments on commit d7da22e

Please sign in to comment.