Commit 53fbf79b authored by Robert Ricci's avatar Robert Ricci
Browse files

A few minor changes:

It's now silent if everything is okay
Add a check for too many measurements in the database
parent 4910a7c8
......@@ -15,6 +15,7 @@ use libtbdb;
use libwanetmondb;
my $numMeas_ok = 100000;
my $numMeas_too_many = 5000000;
my $lastMeasTime_ok = time() - 60; #last measurement must be within 60 seconds
my $query
......@@ -25,9 +26,11 @@ if( scalar(@results) < $numMeas_ok ){
print "fail: too few measurements in ops db\n";
die -1;
}
if( scalar(@results) > $numMeas_too_many ){
print "fail: too many measurements in ops db\n";
die -1;
}
if( $results[0]->{unixstamp} < $lastMeasTime_ok ){
print "fail: last measurement in ops db too old\n";
die -2;
}
print "ok:\n";
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment