diff --git a/pom.xml b/pom.xml index cdf5be2..71f3666 100644 --- a/pom.xml +++ b/pom.xml @@ -8,22 +8,28 @@ weather 2008 - 2.9.1 + 2.10.6 - scala-tools.org - Scala-Tools Maven2 Repository - http://scala-tools.org/repo-releases + scala-tools.releases + Scala-Tools Dependencies Repository for Releases + https://oss.sonatype.org/content/groups/scala-tools + + java.net.maven2 + java.net Maven2 Repository + http://download.java.net/maven/2/ + + - scala-tools.org - Scala-Tools Maven2 Repository - http://scala-tools.org/repo-releases + scala-tools.releases + Scala-Tools Plugins Repository for Releases + https://oss.sonatype.org/content/groups/scala-tools @@ -35,12 +41,12 @@ net.liftweb - lift-util_${scala.version} + lift-util_2.10 2.5.1 net.liftweb - lift-webkit_${scala.version} + lift-webkit_2.10 2.5.1 @@ -71,8 +77,13 @@ org.rrd4j rrd4j - 2.2 - + 3.0 + + + org.slf4j + slf4j-log4j12 + 1.6.1 + diff --git a/src/main/scala/uk/org/floop/msc/comet/WeatherActor.scala b/src/main/scala/uk/org/floop/msc/comet/WeatherActor.scala index 0a6ae9e..72ad127 100644 --- a/src/main/scala/uk/org/floop/msc/comet/WeatherActor.scala +++ b/src/main/scala/uk/org/floop/msc/comet/WeatherActor.scala @@ -94,7 +94,7 @@ override def lowPriority: PartialFunction[Any, Unit] = { case CurrentWeather(w) => - val diff = w -- currentWeather + val diff = w.diff(currentWeather) diff.foreach(pair => currentWeatherMap(pair._1) = pair._2) currentWeather = w reRender(false) diff --git a/src/main/scala/uk/org/floop/msc/wview/DataCollector.scala b/src/main/scala/uk/org/floop/msc/wview/DataCollector.scala index ca297a3..4dff731 100644 --- a/src/main/scala/uk/org/floop/msc/wview/DataCollector.scala +++ b/src/main/scala/uk/org/floop/msc/wview/DataCollector.scala @@ -5,6 +5,7 @@ import scala.collection.mutable.ListBuffer import net.liftweb.http.LiftRules +import net.liftweb.common.Logger import java.net.{InetSocketAddress, SocketTimeoutException, Socket} import java.io.{IOException, DataInputStream, InputStream} @@ -14,7 +15,7 @@ import uk.org.floop.msc.rrd._ -object DataCollector extends Actor { +object DataCollector extends Actor with Logger { def act() { var holdoff = 1000 @@ -27,8 +28,10 @@ var readPos = 0 var packetPos = 0 val values = new ListBuffer[Pair[String, Any]]() - - sock = new Socket("10.79.0.6", 11011) + val weatherHost = System.getenv("WEATHER_HOST") + + info("Attempting to connect to " + weatherHost) + sock = new Socket(weatherHost, 11011) sock.setSoTimeout(30000) var is = sock.getInputStream while (true) {