Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge pull request #92 from tparker-usgs/master
Browse files Browse the repository at this point in the history
ImportWS tweaks
  • Loading branch information
tparker-usgs authored Aug 12, 2019
2 parents 55f7ed3 + f335b9a commit 8da083d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>gov.usgs.volcanoes</groupId>
<artifactId>winston</artifactId>
<version>1.3.11</version>
<version>1.3.12</version>
<packaging>jar</packaging>

<name>Winston</name>
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/gov/usgs/volcanoes/winston/db/Data.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
*/
public class Data {
private static final Logger LOGGER = LoggerFactory.getLogger(Data.class);
private static final double EPSILON = 0.01;

private static final int ONE_DAY = 60 * 60 * 24;
private final WinstonDatabase winston;
Expand Down Expand Up @@ -218,10 +219,9 @@ public List<double[]> findGaps(final Scnl scnl, double t1, final double t2) {
gaps.add(new double[] {t1, bufs.get(0)[0]});
}
double last = bufs.get(0)[1];
double epsilon = 0.01;
for (int i = 1; i < bufs.size(); i++) {
final double[] buf = bufs.get(i);
if (buf[0] - last > epsilon) {
if (buf[0] - last > EPSILON) {
double start = last;
double end = buf[0];
if (end < t1)
Expand Down Expand Up @@ -295,7 +295,7 @@ public List<TimeSpan> findGaps(String code, TimeSpan timeSpan) {
continue;
}

if (buf[0] > last) {
if (buf[0] - last > EPSILON) {
gaps.add(new TimeSpan(J2kSec.asEpoch(last), J2kSec.asEpoch(buf[0])));
}
last = buf[1];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ public void processConfig() throws ParseException {
LOGGER.info("rsamDuration: {}", rsamDuration);

pushGateway = StringUtils.stringToString(config.getString("pushGateway"), DEFAULT_PUSHGATEWAY);
LOGGER.info("pushGateway: {}", pushGateway);
}

public void addStats(final int t, final double td, final double ti) {
Expand Down

0 comments on commit 8da083d

Please sign in to comment.