inserted 2 columns: version and pragramme name
[proteocache.git] / server / compbio / listeners / ContextListener.java
index 356828c..f673e30 100644 (file)
@@ -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();