diff --git a/src/main/java/nl/mpi/oai/harvester/control/Main.java b/src/main/java/nl/mpi/oai/harvester/control/Main.java index ae0f271e..6a09cf1e 100644 --- a/src/main/java/nl/mpi/oai/harvester/control/Main.java +++ b/src/main/java/nl/mpi/oai/harvester/control/Main.java @@ -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) { diff --git a/src/main/java/nl/mpi/oai/harvester/control/Worker.java b/src/main/java/nl/mpi/oai/harvester/control/Worker.java index 0d51f036..f09d8622 100644 --- a/src/main/java/nl/mpi/oai/harvester/control/Worker.java +++ b/src/main/java/nl/mpi/oai/harvester/control/Worker.java @@ -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("/",""));