Skip to content

Commit 579a896

Browse files
authored
Update StandardSource.java
Ref 25b3c7b
1 parent 10df51a commit 579a896

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/main/java/org/xbib/elasticsearch/jdbc/strategy/standard/StandardSource.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -598,8 +598,6 @@ public void fetch() throws SQLException, IOException {
598598
}
599599
if (sourceMetric != null) {
600600
sourceMetric.getSucceeded().inc();
601-
sourceMetric.setLastExecutionStart(dateTime);
602-
sourceMetric.setLastExecutionEnd(new DateTime());
603601
}
604602
} catch (SQLRecoverableException e) {
605603
long millis = getMaxRetryWait().getMillis();
@@ -617,21 +615,19 @@ public void fetch() throws SQLException, IOException {
617615
}
618616
if (sourceMetric != null) {
619617
sourceMetric.getSucceeded().inc();
620-
sourceMetric.setLastExecutionStart(dateTime);
621-
sourceMetric.setLastExecutionEnd(new DateTime());
622618
}
623619
}
624620
}
625621
} catch (Exception e) {
626622
if (sourceMetric != null) {
627623
sourceMetric.getFailed().inc();
628-
sourceMetric.setLastExecutionStart(dateTime);
629-
sourceMetric.setLastExecutionEnd(new DateTime());
630624
}
631625
throw new IOException(e);
632626
} finally {
633627
if (sourceMetric != null) {
634628
sourceMetric.incCounter();
629+
sourceMetric.setLastExecutionStart(dateTime);
630+
sourceMetric.setLastExecutionEnd(new DateTime());
635631
}
636632
}
637633
}

0 commit comments

Comments
 (0)