X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=webservices%2Fcompbio%2Fstat%2Fservlet%2FStatisticCollector.java;h=91eed46dbc28a0cb600a38efbcc1c7cd195f63ac;hb=91dc99b9b18e403c97b1c4e0ead8f754991714a5;hp=978d89a53e44f584ad5df18514fc5a0bdbe6a701;hpb=5289bedee673d95739fdf622dba7be64f8c2df13;p=jabaws.git diff --git a/webservices/compbio/stat/servlet/StatisticCollector.java b/webservices/compbio/stat/servlet/StatisticCollector.java index 978d89a..91eed46 100644 --- a/webservices/compbio/stat/servlet/StatisticCollector.java +++ b/webservices/compbio/stat/servlet/StatisticCollector.java @@ -1,3 +1,20 @@ +/* Copyright (c) 2011 Peter Troshin + * + * JAva Bioinformatics Analysis Web Services (JABAWS) @version: 2.0 + * + * This library is free software; you can redistribute it and/or modify it under the terms of the + * Apache License version 2 as published by the Apache Software Foundation + * + * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache + * License for more details. + * + * A copy of the license is in apache_license.txt. It is also available here: + * @see: http://www.apache.org/licenses/LICENSE-2.0.txt + * + * Any republication or derived work distributed in source code form + * must include this copyright and license notice. + */ package compbio.stat.servlet; import java.util.concurrent.Executors; @@ -58,8 +75,7 @@ public class StatisticCollector implements ServletContextListener { executor = Executors.newScheduledThreadPool(2); if (collectClusterStats()) { - // TODO remove work out of the constructor Tomcat takes ages to - // start! + ExecutionStatCollector clusterCollector = new ExecutionStatCollector( clusterWorkDir, clusterMaxRuntime); clustercf = executor.scheduleAtFixedRate(clusterCollector, 60, @@ -83,7 +99,6 @@ public class StatisticCollector implements ServletContextListener { } else { log.info("Local statistics collector is disabled or not configured! "); } - } static String getClusterJobDir() {