Commit 4550302c6d7a2dd852bdd2fb4181c24f588cee21

Authored by Igor Kulikov
1 parent 92f92850

Fix hsql event cleanup repository

@@ -37,10 +37,6 @@ public class HsqlEventCleanupRepository extends JpaAbstractDaoListeningExecutorS @@ -37,10 +37,6 @@ public class HsqlEventCleanupRepository extends JpaAbstractDaoListeningExecutorS
37 PreparedStatement stmt = connection.prepareStatement("DELETE FROM event WHERE ts < ? AND event_type != 'DEBUG_RULE_NODE' AND event_type != 'DEBUG_RULE_CHAIN'")) { 37 PreparedStatement stmt = connection.prepareStatement("DELETE FROM event WHERE ts < ? AND event_type != 'DEBUG_RULE_NODE' AND event_type != 'DEBUG_RULE_CHAIN'")) {
38 stmt.setLong(1, otherExpirationTime); 38 stmt.setLong(1, otherExpirationTime);
39 stmt.execute(); 39 stmt.execute();
40 - try (ResultSet resultSet = stmt.getResultSet()){  
41 - resultSet.next();  
42 - log.info("Events removed by ttl: [{}]", resultSet.getLong(1));  
43 - }  
44 } catch (SQLException e) { 40 } catch (SQLException e) {
45 log.error("SQLException occurred during events TTL task execution ", e); 41 log.error("SQLException occurred during events TTL task execution ", e);
46 } 42 }
@@ -49,10 +45,6 @@ public class HsqlEventCleanupRepository extends JpaAbstractDaoListeningExecutorS @@ -49,10 +45,6 @@ public class HsqlEventCleanupRepository extends JpaAbstractDaoListeningExecutorS
49 PreparedStatement stmt = connection.prepareStatement("DELETE FROM event WHERE ts < ? AND (event_type = 'DEBUG_RULE_NODE' OR event_type = 'DEBUG_RULE_CHAIN')")) { 45 PreparedStatement stmt = connection.prepareStatement("DELETE FROM event WHERE ts < ? AND (event_type = 'DEBUG_RULE_NODE' OR event_type = 'DEBUG_RULE_CHAIN')")) {
50 stmt.setLong(1, debugExpirationTime); 46 stmt.setLong(1, debugExpirationTime);
51 stmt.execute(); 47 stmt.execute();
52 - try (ResultSet resultSet = stmt.getResultSet()){  
53 - resultSet.next();  
54 - log.info("Debug Events removed by ttl: [{}]", resultSet.getLong(1));  
55 - }  
56 } catch (SQLException e) { 48 } catch (SQLException e) {
57 log.error("SQLException occurred during events TTL task execution ", e); 49 log.error("SQLException occurred during events TTL task execution ", e);
58 } 50 }