Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ public String getName()
return 17.14;
}

@Override
public boolean hasScripts()
{
return true;
}

@Override
protected void doStartupAfterSpringConfig(ModuleContext moduleContext)
{
Expand Down
19 changes: 8 additions & 11 deletions GeneticsCore/src/org/labkey/GeneticsCore/mhc/MhcTaskRef.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.labkey.GeneticsCore.mhc;

import org.apache.commons.lang3.StringUtils;
import org.apache.xmlbeans.XmlException;
import org.jetbrains.annotations.NotNull;
import org.labkey.api.assay.AssayProtocolSchema;
import org.labkey.api.assay.AssayProvider;
Expand Down Expand Up @@ -57,11 +56,11 @@ public RecordedActionSet run(@NotNull PipelineJob job) throws PipelineJobExcepti
Date lastRun = getLastRun(job.getContainer());

SimpleDateFormat _dateTimeFormat = new SimpleDateFormat("yyyy-MM-dd kk:mm");
job.getLogger().info("Last run: " + (lastRun == null ? "never" : _dateTimeFormat.format(lastRun)));
job.getLogger().info("Last run: {}", lastRun == null ? "never" : _dateTimeFormat.format(lastRun));
Date jobStart = new Date();

Set<String> subjects = getIdsWithChangesForAssay(job, lastRun);
job.getLogger().info("Total subjects to process: " + subjects.size());
job.getLogger().info("Total subjects to process: {}", subjects.size());

for (String subject : subjects)
{
Expand All @@ -86,7 +85,7 @@ public List<String> getRequiredSettings()
}

@Override
public void setSettings(Map<String, String> settings) throws XmlException
public void setSettings(Map<String, String> settings)
{

}
Expand Down Expand Up @@ -120,7 +119,7 @@ private Date getLastRun(Container c)

private void processSubject(PipelineJob job, String subject) throws PipelineJobException
{
job.getLogger().info("Processing: " + subject);
job.getLogger().info("Processing: {}", subject);
UserSchema us = QueryService.get().getUserSchema(job.getUser(), getTargetContainer(job), "geneticscore");
TableInfo mhcData = us.getTable("mhc_data");

Expand All @@ -129,13 +128,11 @@ private void processSubject(PipelineJob job, String subject) throws PipelineJobE
if (ts.exists())
{
List<Map<String, Object>> toDelete = new ArrayList<>();
ts.forEachResults(rs -> {
toDelete.add(Map.of("rowid", rs.getString(FieldKey.fromString("rowid")), "objectid", rs.getString(FieldKey.fromString("objectid")), "container", rs.getString(FieldKey.fromString("container"))));
});
ts.forEachResults(rs -> toDelete.add(Map.of("rowid", rs.getString(FieldKey.fromString("rowid")), "objectid", rs.getString(FieldKey.fromString("objectid")), "container", rs.getString(FieldKey.fromString("container")))));

try
{
job.getLogger().info("deleting existing rows: " + toDelete.size());
job.getLogger().info("deleting existing rows: {}", toDelete.size());
QueryUpdateService qus = mhcData.getUpdateService();
qus.setBulkLoad(true);
qus.deleteRows(job.getUser(), getTargetContainer(job), toDelete, null, null);
Expand Down Expand Up @@ -163,7 +160,7 @@ private void processSubject(PipelineJob job, String subject) throws PipelineJobE
{
try
{
job.getLogger().info("inserting rows: " + toInsert.size());
job.getLogger().info("inserting rows: {}", toInsert.size());
BatchValidationException bve = new BatchValidationException();
QueryUpdateService qus = mhcData.getUpdateService();
qus.setBulkLoad(true);
Expand Down Expand Up @@ -224,7 +221,7 @@ private Set<String> getIdsWithChangesForAssay(PipelineJob job, Date dateSince)
ExpRun run = ExperimentService.get().getExpRun(rs.getString(FieldKey.fromString("RunLsid")));
if (run == null)
{
job.getLogger().warn("Unable to find RunLsid for audit row: " + rs.getObject(FieldKey.fromString("RunLsid")));
job.getLogger().warn("Unable to find RunLsid for audit row: {}", rs.getObject(FieldKey.fromString("RunLsid")));
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ public String getName()
return 0.03;
}

@Override
public boolean hasScripts()
{
return true;
}

@Override
@NotNull
protected Collection<WebPartFactory> createWebPartFactories()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ else if (idx == 2)
{
//find the type of sample
String category = "";
int type = Integer.parseInt(cells.get(0));
int type = Integer.parseInt(cells.getFirst());
if (type == 3)
{
category = "Pos Control";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,6 @@ public Double getSchemaVersion()
return Collections.singleton(ONPRC_EHR_ComplianceDBSchema.NAME);
}

@Override
public boolean hasScripts()
{
return true;
}

@Override
protected void registerSchemas()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ public String getName()
return 23.002;
}

@Override
public boolean hasScripts()
{
return true;
}

@Override
protected void init()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void renderGridCellContents(RenderContext ctx, HtmlWriter out)
out.write(HtmlString.NBSP);
}
};
ret.add(0, update);
ret.addFirst(update);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public TableInfo createTable(String name, ContainerFilter cf)
}

@Override
public QueryView createView(ViewContext context, @NotNull QuerySettings settings, BindException errors)
public @NotNull QueryView createView(ViewContext context, @NotNull QuerySettings settings, BindException errors)
{
// Enable this block if you want the Events table to show edit link for non-Admins for
// future events which the users is the "owner"
Expand Down
6 changes: 3 additions & 3 deletions mergesync/src/org/labkey/mergesync/MergeSyncManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public synchronized void schedule()

if (_syncInterval <= 0)
{
_log.error("Merge sync has an invalid frequency, will not schedule: " + _syncInterval);
_log.error("Merge sync has an invalid frequency, will not schedule: {}", _syncInterval);
return;
}

Expand All @@ -122,7 +122,7 @@ public synchronized void schedule()

StdSchedulerFactory.getDefaultScheduler().scheduleJob(_job, _trigger);

_log.info("Merge sync scheduled to run every " + getSyncInterval() + " minutes");
_log.info("Merge sync scheduled to run every {} minutes", getSyncInterval());
}
catch (IllegalArgumentException e)
{
Expand Down Expand Up @@ -265,7 +265,7 @@ public User getLabKeyUser()
}
catch (ValidEmail.InvalidEmailException e)
{
_log.error("Invalid email saved for Merge Sync: " + e.getMessage());
_log.error("Invalid email saved for Merge Sync: {}", e.getMessage());
}

return null;
Expand Down
6 changes: 0 additions & 6 deletions mergesync/src/org/labkey/mergesync/MergeSyncModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ public String getName()
return 0.11;
}

@Override
public boolean hasScripts()
{
return true;
}

@NotNull
@Override
protected Collection<WebPartFactory> createWebPartFactories()
Expand Down
Loading
Loading