diff options
Diffstat (limited to 'feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/DistributedLockingFeature.java')
-rw-r--r-- | feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/DistributedLockingFeature.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/DistributedLockingFeature.java b/feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/DistributedLockingFeature.java index 03872e1e..88035ca7 100644 --- a/feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/DistributedLockingFeature.java +++ b/feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/DistributedLockingFeature.java @@ -152,11 +152,11 @@ public class DistributedLockingFeature implements PolicyEngineFeatureAPI, Policy private void cleanLockTable() { try (Connection conn = dataSource.getConnection(); - PreparedStatement statement = conn.prepareStatement("DELETE FROM pooling.locks WHERE host = ? OR expirationTime < ?"); + PreparedStatement statement = conn.prepareStatement( + "DELETE FROM pooling.locks WHERE host = ? OR expirationTime < now()"); ){ statement.setString(1, uuid.toString()); - statement.setLong(2, System.currentTimeMillis()); statement.executeUpdate(); } catch (SQLException e) { |