[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] [metrics-web/master] Try harder to cut off last two days of BW history.



Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Wed, 6 Oct 2010 15:00:17 +0200
Subject: Try harder to cut off last two days of BW history.
Commit: 704e417d878154999d7af92c99083c383bee00ed

---
 rserve/graphs.R |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/rserve/graphs.R b/rserve/graphs.R
index 13c44c3..3d89a4e 100644
--- a/rserve/graphs.R
+++ b/rserve/graphs.R
@@ -101,7 +101,7 @@ plot_bandwidth <- function(start, end, path) {
   bw_desc <- fetch(rs, n = -1)
   q <- paste("SELECT date, read, written FROM total_bwhist ",
       "WHERE date >= '", start, "' AND date <= '", end, "' ",
-      "AND date < current_date - 1", sep = "")
+      "AND date < (SELECT MAX(date) FROM total_bwhist) - 1 ", sep = "")
   rs <- dbSendQuery(con, q)
   bw_hist <- fetch(rs, n = -1)
   dbDisconnect(con)
-- 
1.7.1