Исправить переход смены ключей при пустых датах

This commit is contained in:
AidarKC
2026-09-27 16:50:21 +03:00
parent f5698771e4
commit 9be4c4d3a5
@@ -234,8 +234,10 @@ public final class KeyRotationSessionsDAO {
}
long now = System.currentTimeMillis();
Long completed = next == KeyRotationStatus.COMPLETE ? now : current.getCompletedAtMs();
Long aborted = next == KeyRotationStatus.ABORTED ? now : current.getAbortedAtMs();
Long completed = current.getCompletedAtMs();
if (next == KeyRotationStatus.COMPLETE) completed = now;
Long aborted = current.getAbortedAtMs();
if (next == KeyRotationStatus.ABORTED) aborted = now;
try (PreparedStatement ps = c.prepareStatement("""
UPDATE key_rotation_sessions