From bdb2d648d4b27a0ff5d1c264ef52c27e27f59984 Mon Sep 17 00:00:00 2001 From: Sasha Sherstnev Date: Wed, 29 Jan 2014 08:07:37 +0000 Subject: [PATCH] Switichin between different Jpred installations --- conf/Proteocache.properties | 4 +++- server/compbio/listeners/ContextListener.java | 9 +++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/conf/Proteocache.properties b/conf/Proteocache.properties index 24307b7..2b2a2fd 100644 --- a/conf/Proteocache.properties +++ b/conf/Proteocache.properties @@ -1,7 +1,8 @@ ################################################################################# # Cassandra host or IP # test server is 10.0.115.190 -cassandra.host=localhost +#cassandra.host=localhost +cassandra.host=Main-laptop2.dyn.lifesci.dundee.ac.uk #cassandra.host=gjb-www-1.cluster.lifesci.dundee.ac.uk #cassandra.host=c6100-1.cluster.lifesci.dundee.ac.uk @@ -14,6 +15,7 @@ cassandra.version.update=false cassandra.jpred.web.update=true cassandra.jpred.web.inidelay=0 cassandra.jpred.web.updaterate=30 +#cassandra.jpred.web.prefix=http://gjb-www-1.cluster.lifesci.dundee.ac.uk:3209/results # update time period (in days) # by defauls for 100 past days diff --git a/server/compbio/listeners/ContextListener.java b/server/compbio/listeners/ContextListener.java index f673e30..f862a2f 100644 --- a/server/compbio/listeners/ContextListener.java +++ b/server/compbio/listeners/ContextListener.java @@ -91,8 +91,13 @@ public class ContextListener implements ServletContextListener { if (READ_WEB_JPRED) { // get data from real Jpred production server - final String datasrc = "http://www.compbio.dundee.ac.uk/www-jpred/results/usage-new/alljobs.dat"; - final String prefix = "http://www.compbio.dundee.ac.uk/www-jpred/results"; + String theprefix = ph.getProperty("cassandra.jpred.web.prefix"); + if (null == theprefix) { + theprefix = "http://www.compbio.dundee.ac.uk/www-jpred/results"; + } + + final String datasrc = theprefix + "/usage-new/alljobs.dat"; + final String prefix = theprefix; final JpredParserHTTP parser = new JpredParserHTTP(prefix); int initialdelay = 300; -- 1.7.10.2