Skip to content

Commit c1e5de5

Browse files
committed
Allow orphan file job to abort if cancelled mid-task
1 parent f1e44c2 commit c1e5de5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

SequenceAnalysis/src/org/labkey/sequenceanalysis/pipeline/OrphanFilePipelineJob.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import org.labkey.api.files.FileUrls;
1717
import org.labkey.api.pipeline.AbstractTaskFactory;
1818
import org.labkey.api.pipeline.AbstractTaskFactorySettings;
19+
import org.labkey.api.pipeline.CancelledException;
1920
import org.labkey.api.pipeline.PipeRoot;
2021
import org.labkey.api.pipeline.PipelineJob;
2122
import org.labkey.api.pipeline.PipelineJobException;
@@ -324,6 +325,11 @@ public void getOrphanFilesForContainer(Container c, User u, Set<File> orphanFile
324325
return;
325326
}
326327

328+
if (getJob().isCancelled())
329+
{
330+
throw new CancelledException();
331+
}
332+
327333
messages.add("## processing container: " + c.getPath());
328334

329335
Map<URI, Set<Integer>> dataMap = getDataMapForContainer(c);

0 commit comments

Comments
 (0)