Skip to content

Commit 57666c1

Browse files
committed
Allow long-running upgrade code to run separate from update
1 parent fd9b12d commit 57666c1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

SequenceAnalysis/src/org/labkey/sequenceanalysis/SequenceAnalysisUpgradeCode.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,12 @@ public static void doSequenceMigration(User u, Logger log)
247247
TableInfo ti = SequenceAnalysisSchema.getTable(SequenceAnalysisSchema.TABLE_REF_NT_SEQUENCES);
248248
TableSelector ts = new TableSelector(ti);
249249
List<RefNtSequenceModel> nts = ts.getArrayList(RefNtSequenceModel.class);
250+
if (nts.size() > 100000)
251+
{
252+
log.info("There are too many sequences to migrate on startup. Please run MigrateSequenceFilesAction");
253+
return;
254+
}
255+
250256
log.info(nts.size() + " total sequences to migrate");
251257
int processed = 0;
252258
int totalMigrated = 0;

0 commit comments

Comments
 (0)