Skip to content

Commit

Permalink
Modify thread timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcgowan committed Jun 23, 2020
1 parent a89628b commit cf199af
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/java/edu/umn/msi/gx/java/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public static void main(String[] args) throws Exception {
}
//wait . . .
executor.shutdown();
executor.awaitTermination(xmlTasks.size() * 120, TimeUnit.MINUTES); //2 minutes per xml handler
executor.awaitTermination(xmlTasks.size() * 120, TimeUnit.MINUTES); //120 minutes per xml handler
logger.info("Finished mzIdent parsing");

DatabaseManager dbMgr = new DatabaseManager(databasePathName);
Expand Down Expand Up @@ -168,7 +168,11 @@ public static void main(String[] args) throws Exception {
executor.execute(mr);
}
executor.shutdown();
executor.awaitTermination((mgfReaders.size() * 5), TimeUnit.MINUTES); //5 min max per mgf file.
boolean mgfDone = executor.awaitTermination((mgfReaders.size() * 30), TimeUnit.MINUTES); //30 min max per mgf file.

if (!mgfDone) {
throw new Exception("Thread timeout occurred before mgfReader threads completed.");
}

for (MGFReader mr : mgfReaders) {
MetaTableManager.setMGFData(mr.getScans());
Expand Down

0 comments on commit cf199af

Please sign in to comment.