22
33import org .apache .xmlbeans .XmlException ;
44import org .jetbrains .annotations .NotNull ;
5- import org .labkey .api .data .SimpleFilter ;
6- import org .labkey .api .data .TableInfo ;
7- import org .labkey .api .data .TableSelector ;
85import org .labkey .api .di .TaskRefTask ;
9- import org .labkey .api .jbrowse .JBrowseService ;
106import org .labkey .api .pipeline .PipelineJob ;
117import org .labkey .api .pipeline .PipelineJobException ;
128import org .labkey .api .pipeline .RecordedActionSet ;
13- import org .labkey .api .query .FieldKey ;
14- import org .labkey .api .query .QueryService ;
15- import org .labkey .api .query .UserSchema ;
16- import org .labkey .api .util .PageFlowUtil ;
179import org .labkey .api .writer .ContainerUser ;
18- import org .labkey .mgap .mGAPSchema ;
1910
2011import java .util .List ;
2112import java .util .Map ;
@@ -28,26 +19,6 @@ public class PerformQueuedEtlWorkTask implements TaskRefTask
2819 public RecordedActionSet run (@ NotNull PipelineJob job ) throws PipelineJobException
2920 {
3021 EtlQueueManager .get ().performQueuedWork (_containerUser .getContainer (), job .getLogger ());
31-
32- // clear/warm caches:
33- final TableInfo dbm = QueryService .get ().getUserSchema (_containerUser .getUser (), _containerUser .getContainer (), "jbrowse" ).getTable ("database_members" );
34- new TableSelector (QueryService .get ().getUserSchema (_containerUser .getUser (), _containerUser .getContainer (), mGAPSchema .NAME ).getTable (mGAPSchema .TABLE_VARIANT_CATALOG_RELEASES ), PageFlowUtil .set ("objectId" , "jbrowseId" )).forEachResults (rs -> {
35- String jbrowseId = rs .getString (FieldKey .fromString ("jbrowseId" ));
36- List <String > trackIds = new TableSelector (dbm , PageFlowUtil .set ("objectid" ), new SimpleFilter (FieldKey .fromString ("database" ), jbrowseId ).addCondition (FieldKey .fromString ("jsonfile/outputfile/name" ), "mGAP Release" ), null ).getArrayList (String .class );
37- if (trackIds .isEmpty ())
38- {
39- job .getLogger ().error ("No mGAP Release track found for session: " + jbrowseId );
40- }
41- else if (trackIds .size () > 1 )
42- {
43- job .getLogger ().error ("More than one mGAP Release track found for session: " + jbrowseId );
44- }
45- else
46- {
47- JBrowseService .get ().cacheDefaultQuery (_containerUser .getUser (), rs .getString (FieldKey .fromString ("objectId" )), trackIds .get (0 ));
48- }
49- });
50-
5122 return new RecordedActionSet ();
5223 }
5324
0 commit comments