X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=server%2Fcompbio%2Flisteners%2FContextListener.java;h=f673e307819d09846c7c1746a160bdd97929f405;hb=7de49cca0d2c7525f698001533e0b48193715413;hp=356828cbfce7b75c8b06634c4aa3e2eb3ebc71fd;hpb=6ccd0c1414766d7ffa84f6594a9a14d50c5053b8;p=proteocache.git diff --git a/server/compbio/listeners/ContextListener.java b/server/compbio/listeners/ContextListener.java index 356828c..f673e30 100644 --- a/server/compbio/listeners/ContextListener.java +++ b/server/compbio/listeners/ContextListener.java @@ -39,6 +39,7 @@ public class ContextListener implements ServletContextListener { public static boolean READ_WEB_JPRED = false; public static boolean READ_LOCALFILE_JPRED = false; public static boolean FILL_NEWTABLE = false; + public static boolean UPDATE_TABLE = false; private static boolean initBooleanValue(String key) { assert key != null; @@ -62,8 +63,20 @@ public class ContextListener implements ServletContextListener { READ_WEB_JPRED = initBooleanValue("cassandra.jpred.web.update"); READ_LOCALFILE_JPRED = initBooleanValue("cassandra.jpred.local.update"); FILL_NEWTABLE = initBooleanValue("cassandra.newtables.update"); + UPDATE_TABLE = initBooleanValue("cassandra.version.update"); executor = Executors.newScheduledThreadPool(3); + if (UPDATE_TABLE) { + System.out.println("Initializating update version parameter"); + //update_scheduler = Executors.newSingleThreadScheduledExecutor(); + //update_scheduler.schedule(new Runnable() { + executor.schedule(new Runnable() { + @Override + public void run() { + updater.FillNewParameter(); + } + }, 10, TimeUnit.SECONDS); + } if (FILL_NEWTABLE) { System.out.println("Initializating new table update scheduler"); //update_scheduler = Executors.newSingleThreadScheduledExecutor();