From 52eb85757e061c85366be342f417dd3e11ba2b2f Mon Sep 17 00:00:00 2001 From: Florian M Date: Mon, 26 Jun 2023 10:49:37 +0200 Subject: [PATCH] remove globalize floodfill backend code --- app/controllers/JobsController.scala | 39 ------------------- app/models/job/Job.scala | 8 +--- conf/webknossos.latest.routes | 1 - .../EditableMappingService.scala | 1 - 4 files changed, 1 insertion(+), 48 deletions(-) diff --git a/app/controllers/JobsController.scala b/app/controllers/JobsController.scala index d222f10bd04..5523ac22192 100644 --- a/app/controllers/JobsController.scala +++ b/app/controllers/JobsController.scala @@ -185,45 +185,6 @@ class JobsController @Inject()(jobDAO: JobDAO, } } - def runGlobalizeFloodfills( - organizationName: String, - dataSetName: String, - fallbackLayerName: String, - annotationId: String, - annotationType: String, - newDatasetName: String, - volumeLayerName: Option[String] - ): Action[AnyContent] = - sil.SecuredAction.async { implicit request => - log(Some(slackNotificationService.noticeFailedJobRequest)) { - for { - organization <- organizationDAO.findOneByName(organizationName)(GlobalAccessContext) ?~> Messages( - "organization.notFound", - organizationName) - _ <- bool2Fox(request.identity._organization == organization._id) ?~> "job.globalizeFloodfill.notAllowed.organization" ~> FORBIDDEN - userAuthToken <- wkSilhouetteEnvironment.combinedAuthenticatorService.findOrCreateToken( - request.identity.loginInfo) - dataSet <- dataSetDAO.findOneByNameAndOrganization(dataSetName, organization._id) ?~> Messages( - "dataSet.notFound", - dataSetName) ~> NOT_FOUND - command = JobCommand.globalize_floodfills - commandArgs = Json.obj( - "organization_name" -> organizationName, - "dataset_name" -> dataSetName, - "fallback_layer_name" -> fallbackLayerName, - "webknossos_token" -> RpcTokenHolder.webKnossosToken, - "user_auth_token" -> userAuthToken.id, - "annotation_id" -> annotationId, - "annotation_type" -> annotationType, - "new_dataset_name" -> newDatasetName, - "volume_layer_name" -> volumeLayerName - ) - job <- jobService.submitJob(command, commandArgs, request.identity, dataSet._dataStore) ?~> "job.couldNotRunGlobalizeFloodfills" - js <- jobService.publicWrites(job) - } yield Ok(js) - } - } - def runExportTiffJob(organizationName: String, dataSetName: String, bbox: String, diff --git a/app/models/job/Job.scala b/app/models/job/Job.scala index c500e5c48da..f711c845b88 100644 --- a/app/models/job/Job.scala +++ b/app/models/job/Job.scala @@ -354,12 +354,6 @@ class JobService @Inject()(wkConf: WkConf, "Volume Annotation Merged", "Your volume annotation has been successfully merged with the existing segmentation. The result is available as a new dataset in your dashboard." )) - case JobCommand.globalize_floodfills => - Some( - genericEmailTemplate( - "Globalize Flood Fill", - "The flood fill operations have been extended to the whole dataset. The result is available as a new dataset in your dashboard." - )) case JobCommand.compute_mesh_file => Some( genericEmailTemplate( @@ -368,7 +362,7 @@ class JobService @Inject()(wkConf: WkConf, )) case _ => None }) ?~> "job.emailNotifactionsDisabled" - // some jobs, e.g. "globalize flood fill"/"find largest segment ideas", do not require an email notification + // some jobs, e.g. "find largest segment ideas", do not require an email notification _ = Mailer ! Send(emailTemplate) } yield () diff --git a/conf/webknossos.latest.routes b/conf/webknossos.latest.routes index f74e69b672b..b57ee1e8f56 100644 --- a/conf/webknossos.latest.routes +++ b/conf/webknossos.latest.routes @@ -257,7 +257,6 @@ POST /jobs/run/computeMeshFile/:organizationName/:dataSetName POST /jobs/run/exportTiff/:organizationName/:dataSetName controllers.JobsController.runExportTiffJob(organizationName: String, dataSetName: String, bbox: String, layerName: Option[String], mag: Option[String], annotationLayerName: Option[String], annotationId: Option[String], asOmeTiff: Boolean) POST /jobs/run/inferNuclei/:organizationName/:dataSetName controllers.JobsController.runInferNucleiJob(organizationName: String, dataSetName: String, layerName: String, newDatasetName: String) POST /jobs/run/inferNeurons/:organizationName/:dataSetName controllers.JobsController.runInferNeuronsJob(organizationName: String, dataSetName: String, layerName: String, bbox: String, newDatasetName: String) -POST /jobs/run/globalizeFloodfills/:organizationName/:dataSetName controllers.JobsController.runGlobalizeFloodfills(organizationName: String, dataSetName: String, fallbackLayerName: String, annotationId: String, annotationType: String, newDatasetName: String, volumeLayerName: Option[String]) POST /jobs/run/materializeVolumeAnnotation/:organizationName/:dataSetName controllers.JobsController.runMaterializeVolumeAnnotationJob(organizationName: String, dataSetName: String, fallbackLayerName: String, annotationId: String, annotationType: String, newDatasetName: String, outputSegmentationLayerName: String, mergeSegments: Boolean, volumeLayerName: Option[String]) POST /jobs/run/findLargestSegmentId/:organizationName/:dataSetName controllers.JobsController.runFindLargestSegmentIdJob(organizationName: String, dataSetName: String, layerName: String) GET /jobs/:id controllers.JobsController.get(id: String) diff --git a/webknossos-tracingstore/app/com/scalableminds/webknossos/tracingstore/tracings/editablemapping/EditableMappingService.scala b/webknossos-tracingstore/app/com/scalableminds/webknossos/tracingstore/tracings/editablemapping/EditableMappingService.scala index 47a5e7b83b2..25bf524514d 100644 --- a/webknossos-tracingstore/app/com/scalableminds/webknossos/tracingstore/tracings/editablemapping/EditableMappingService.scala +++ b/webknossos-tracingstore/app/com/scalableminds/webknossos/tracingstore/tracings/editablemapping/EditableMappingService.scala @@ -230,7 +230,6 @@ class EditableMappingService @Inject()( remoteFallbackLayer: RemoteFallbackLayer, userToken: Option[String]): Fox[EditableMappingInfo] = for { - before <- Fox.successful(Instant.now) closestMaterializedWithVersion <- getClosestMaterialized(editableMappingId, desiredVersion) updatedEditableMappingInfo: EditableMappingInfo <- if (desiredVersion == closestMaterializedWithVersion.version) Fox.successful(closestMaterializedWithVersion.value)