Browse code

revisions

Jeff Owrey authored on 02/15/2016 01:01:24
Showing 2 changed files
... ...
@@ -50,7 +50,7 @@ _OUTPUT_DATA_FILE = "/tmp/radmon/radmonData.js" # output file used by HTML docs
50 50
     ### GLOBAL CONSTANTS ###
51 51
 
52 52
 _DEFAULT_WEB_DATA_UPDATE_INTERVAL = 10
53
-_CHART_UPDATE_INTERVAL = 60 # defines how often the charts get updated
53
+_CHART_UPDATE_INTERVAL = 300 # defines how often the charts get updated
54 54
 _DATABASE_UPDATE_INTERVAL = 30 # defines how often the database gets updated
55 55
 _HTTP_REQUEST_TIMEOUT = 5 # number seconds to wait for a response to HTTP request
56 56
 _CHART_WIDTH = 600
... ...
@@ -59,7 +59,7 @@ _CHART_HEIGHT = 150
59 59
    ### GLOBAL VARIABLES ###
60 60
 
61 61
 webUpdateInterval = _DEFAULT_WEB_DATA_UPDATE_INTERVAL  # web update frequency
62
-deviceUrl = {your device URL}  # radiation monitor network address
62
+deviceUrl = "http://73.157.139.23:4371"  # radiation monitor network address
63 63
 deviceOnline = True
64 64
 debugOption = False
65 65
 
... ...
@@ -405,12 +405,11 @@ def main():
405 405
             if result:
406 406
                 writeOutputDataFile(dData)
407 407
 
408
-        # At the rrdtool database update interval, update the database.
409
-        if currentTime - lastDatabaseUpdateTime > _DATABASE_UPDATE_INTERVAL:   
410
-            lastDatabaseUpdateTime = currentTime
411
-            if result:
412
-                ## Update the round robin database with the parsed data.
413
-                result = updateDatabase(dData)
408
+                # At the rrdtool database update interval, update the database.
409
+                if currentTime - lastDatabaseUpdateTime > _DATABASE_UPDATE_INTERVAL:   
410
+                    lastDatabaseUpdateTime = currentTime
411
+                    ## Update the round robin database with the parsed data.
412
+                    result = updateDatabase(dData)
414 413
 
415 414
         # At the chart generation interval, generate charts.
416 415
         if currentTime - lastChartUpdateTime > _CHART_UPDATE_INTERVAL:
... ...
@@ -179,7 +179,7 @@ function getRadmonData() {
179 179
 function show_charts(n) {
180 180
     graphPeriod = n;
181 181
     getRadmonGraphs();   
182
-    setInterval(getRadmonGraphs, 60000);
182
+    setInterval(getRadmonGraphs, 300000);
183 183
 }
184 184
 
185 185
 function getRadmonGraphs() {