Skip to content

Commit f7f4fa9

Browse files
committed
Add ability to change setting for dropping multi-lineage MHC in cleanup job
1 parent 346b4c6 commit f7f4fa9

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

primeseq/src/org/labkey/primeseq/PrimeseqController.java

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,7 @@ public ModelAndView getConfirmView(PerformMhcCleanupForm o, BindException errors
632632

633633
return new HtmlView(HtmlString.unsafe(HtmlString.of("This will run a pipeline job to delete low-frequency MHC results to save space. Do you want to continue?") +
634634
"<br>Check box to delete records: <input type=\"checkbox\" name=\"performDeletes\" />" +
635+
"<br>Delete multi-lineage records: <input type=\"checkbox\" name=\"deleteMultiLineage\" />" +
635636
"<br>Min Analysis ID: <input type=\"input\" name=\"minAnalysisId\" value=\"1\" />"
636637
));
637638
}
@@ -640,7 +641,12 @@ public ModelAndView getConfirmView(PerformMhcCleanupForm o, BindException errors
640641
public boolean handlePost(PerformMhcCleanupForm o, BindException errors) throws Exception
641642
{
642643
PipeRoot pipelineRoot = PipelineService.get().findPipelineRoot(getContainer());
643-
PipelineService.get().queueJob(new MhcCleanupPipelineJob(getContainer(), getUser(), getViewContext().getActionURL(), pipelineRoot, o.isPerformDeletes(), o.getMinAnalysisId()));
644+
MhcCleanupPipelineJob job = new MhcCleanupPipelineJob(getContainer(), getUser(), getViewContext().getActionURL(), pipelineRoot, o.isPerformDeletes(), o.getMinAnalysisId());
645+
if (o.isDeleteMultiLineage()) {
646+
job.setDropMultiLineageMHC(o.isDeleteMultiLineage());
647+
}
648+
649+
PipelineService.get().queueJob(job);
644650

645651
return true;
646652
}
@@ -661,6 +667,7 @@ public void validateCommand(PerformMhcCleanupForm o, Errors errors)
661667
public static class PerformMhcCleanupForm
662668
{
663669
private boolean _performDeletes = false;
670+
private boolean _deleteMultiLineage = false;
664671
private int _minAnalysisId = 0;
665672

666673
public boolean isPerformDeletes()
@@ -682,5 +689,15 @@ public void setMinAnalysisId(int minAnalysisId)
682689
{
683690
_minAnalysisId = minAnalysisId;
684691
}
692+
693+
public boolean isDeleteMultiLineage()
694+
{
695+
return _deleteMultiLineage;
696+
}
697+
698+
public void setDeleteMultiLineage(boolean deleteMultiLineage)
699+
{
700+
_deleteMultiLineage = deleteMultiLineage;
701+
}
685702
}
686703
}

primeseq/src/org/labkey/primeseq/pipeline/MhcCleanupPipelineJob.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,11 @@ public boolean isDropMultiLineageMHC()
158158
return _dropMultiLineageMHC;
159159
}
160160

161+
public void setDropMultiLineageMHC(boolean dropMultiLineageMHC)
162+
{
163+
_dropMultiLineageMHC = dropMultiLineageMHC;
164+
}
165+
161166
public static class Task extends PipelineJob.Task<Task.Factory>
162167
{
163168
protected Task(Factory factory, PipelineJob job)

0 commit comments

Comments
 (0)