3535import org .labkey .api .exp .api .ExpProtocol ;
3636import org .labkey .api .exp .api .ExpRun ;
3737import org .labkey .api .exp .api .ExperimentService ;
38- import org .labkey .api .exp .pipeline .XarGeneratorId ;
3938import org .labkey .api .module .Module ;
4039import org .labkey .api .module .ModuleLoader ;
4140import org .labkey .api .pipeline .AbstractTaskFactory ;
4645import org .labkey .api .pipeline .PipelineValidationException ;
4746import org .labkey .api .pipeline .RecordedAction ;
4847import org .labkey .api .pipeline .RecordedActionSet ;
49- import org .labkey .api .pipeline .TaskFactory ;
5048import org .labkey .api .pipeline .TaskId ;
5149import org .labkey .api .pipeline .XMLBeanTaskFactoryFactory ;
5250import org .labkey .api .pipeline .file .AbstractFileAnalysisJob ;
7068import org .labkey .vfs .FileLike ;
7169import org .labkey .vfs .FileSystemLike ;
7270
71+ import java .io .BufferedInputStream ;
7372import java .io .File ;
7473import java .io .IOException ;
7574import java .net .URI ;
@@ -95,7 +94,7 @@ public class AssayImportRunTask extends PipelineJob.Task<AssayImportRunTask.Fact
9594 public static class FactoryFactory implements XMLBeanTaskFactoryFactory
9695 {
9796 @ Override
98- public TaskFactory create (TaskId taskId , TaskType xobj , Path taskDir )
97+ public Factory create (TaskId taskId , TaskType xobj , Path taskDir )
9998 {
10099 if (taskId .getModuleName () == null )
101100 throw new IllegalArgumentException ("Task factory must be defined by a module" );
@@ -245,7 +244,7 @@ List<Map<String, Object>> getRawData(PipelineJob job) throws PipelineJobExceptio
245244 {
246245 job .getLogger ().info ("Processing excel file: " + dataFile .getName ());
247246 // check to see if this is a multi-sheet format
248- try (ExcelLoader loader = new ExcelLoader (dataFile .openInputStream (), true , null ))
247+ try (ExcelLoader loader = new ExcelLoader (new BufferedInputStream ( dataFile .openInputStream () ), true , null ))
249248 {
250249 List <String > sheets = loader .getSheetNames ();
251250 if (sheets .size () > 1 )
@@ -424,8 +423,6 @@ private FileLike getExplodedZipDir(PipelineJob job, FileLike dataFile)
424423
425424 public static class Factory extends AbstractTaskFactory <AssayImportRunTaskFactorySettings , Factory >
426425 {
427- private final FileType _outputType = XarGeneratorId .FT_PIPE_XAR_XML ;
428-
429426 private String _providerName = "${" + PROVIDER_NAME_PROPERTY + "}" ;
430427 private String _protocolName = "${" + PROTOCOL_NAME_PROPERTY + "}" ;
431428
@@ -434,7 +431,7 @@ public Factory()
434431 super (AssayImportRunTaskId .class );
435432 }
436433
437- public Factory (Class namespaceClass )
434+ public Factory (Class <?> namespaceClass )
438435 {
439436 super (namespaceClass );
440437 }
@@ -468,11 +465,6 @@ public List<FileType> getInputTypes()
468465 return Collections .emptyList ();
469466 }
470467
471- public FileType getOutputType ()
472- {
473- return _outputType ;
474- }
475-
476468 @ Override
477469 public String getStatusName ()
478470 {
@@ -802,7 +794,7 @@ public RecordedActionSet run() throws PipelineJobException
802794 createData (matchedFile , assayDataType );
803795
804796
805- AssayRunUploadContext .Factory <? extends AssayProvider , ? extends AssayRunUploadContext .Factory > factory
797+ AssayRunUploadContext .Factory <? extends AssayProvider , ? extends AssayRunUploadContext .Factory <?, ?> > factory
806798 = provider .createRunUploadFactory (protocol , user , container );
807799
808800 factory .setName (getName ());
@@ -828,7 +820,7 @@ public RecordedActionSet run() throws PipelineJobException
828820
829821 factory .setLogger (getJob ().getLogger ());
830822
831- AssayRunUploadContext uploadContext = factory .create ();
823+ AssayRunUploadContext <?> uploadContext = factory .create ();
832824
833825 Long batchId = null ;
834826
@@ -857,7 +849,7 @@ public RecordedActionSet run() throws PipelineJobException
857849// }
858850
859851 // Check if we've been cancelled. If so, delete any newly created runs from the database
860- PipelineStatusFile statusFile = PipelineService .get ().getStatusFile (getJob ().getLogFile ());
852+ PipelineStatusFile statusFile = PipelineService .get ().getStatusFile (getJob ().getContainer (), getJob (). getLogFileLike ());
861853 if (statusFile != null && (PipelineJob .TaskStatus .cancelled .matches (statusFile .getStatus ()) || PipelineJob .TaskStatus .cancelling .matches (statusFile .getStatus ())))
862854 {
863855 getJob ().info ("Deleting run " + run .getName () + " due to cancellation request" );
0 commit comments