|
40 | 40 | import org.labkey.api.pipeline.AbstractTaskFactorySettings; |
41 | 41 | import org.labkey.api.pipeline.PipelineJob; |
42 | 42 | import org.labkey.api.pipeline.PipelineJobException; |
| 43 | +import org.labkey.api.pipeline.PipelineJobService; |
43 | 44 | import org.labkey.api.pipeline.RecordedAction; |
44 | 45 | import org.labkey.api.pipeline.RecordedActionSet; |
45 | 46 | import org.labkey.api.pipeline.file.FileAnalysisJobSupport; |
@@ -153,7 +154,9 @@ public RecordedActionSet run() throws PipelineJobException |
153 | 154 | processInbreeding(job.getContainer(), job.getUser(), support.getAnalysisDirectoryPath().toFile(), job.getLogger()); |
154 | 155 | processKinship(job.getContainer(), job.getUser(), support.getAnalysisDirectoryPath().toFile(), job.getLogger()); |
155 | 156 |
|
156 | | - if (GeneticCalculationsJob.isKinshipValidation()) |
| 157 | + // NOTE: pass this through XML in case the job runs on a remote server: |
| 158 | + boolean kinshipValidation = Boolean.parseBoolean(getJob().getParameters().getOrDefault("kinshipValidation", "false")); |
| 159 | + if (kinshipValidation) |
157 | 160 | { |
158 | 161 | validateKinship(); |
159 | 162 | } |
@@ -521,6 +524,11 @@ private boolean validateKinship() |
521 | 524 | PipelineJob job = getJob(); |
522 | 525 | job.getLogger().info("Validate kinship"); |
523 | 526 |
|
| 527 | + if (PipelineJobService.get().getLocationType() != PipelineJobService.LocationType.WebServer) |
| 528 | + { |
| 529 | + throw new IllegalStateException("Kinship validation must be run on the webserver. This task is set to execute on: " + PipelineJobService.get().getLocationType()); |
| 530 | + } |
| 531 | + |
524 | 532 | UserSchema ehrSchema = QueryService.get().getUserSchema(job.getUser(), job.getContainer(), "ehr"); |
525 | 533 | if (ehrSchema == null) |
526 | 534 | { |
|
0 commit comments