Skip to content

Commit

Permalink
Strip new lines out of the provider name. Shutdown the ScheduledThrea…
Browse files Browse the repository at this point in the history
…dPoolExecutor.
  • Loading branch information
menzowindhouwer committed Nov 18, 2016
1 parent 269f4e3 commit 04678a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/main/java/nl/mpi/oai/harvester/control/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ private static void runHarvesting(Configuration config) {
Worker worker = new Worker(provider, config.getActionSequences(), cycle);
executor.execute(worker);
}

executor.shutdown();
}

public static void main(String[] args) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/nl/mpi/oai/harvester/control/Worker.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public void run() {
logger.debug("Welcome to OAI Harvest Manager worker!");
provider.init();

Thread.currentThread().setName(provider.getName());
Thread.currentThread().setName(provider.getName().replaceAll("[^a-zA-Z0-9\\-\\(\\)]"," "));

// setting specific log filename
ThreadContext.put("logFileName", Util.toFileFormat(provider.getName()).replaceAll("/",""));
Expand Down

0 comments on commit 04678a2

Please sign in to comment.