From a1df9e886ae977671679f22d47b61624c31bc681 Mon Sep 17 00:00:00 2001 From: Viktor Lofgren Date: Mon, 15 Jan 2024 16:14:02 +0100 Subject: [PATCH] (control) Also clean up stale 'NEW' messages --- .../main/java/nu/marginalia/mq/persistence/MqPersistence.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/libraries/message-queue/src/main/java/nu/marginalia/mq/persistence/MqPersistence.java b/code/libraries/message-queue/src/main/java/nu/marginalia/mq/persistence/MqPersistence.java index 2f4b1ea0..f32213b4 100644 --- a/code/libraries/message-queue/src/main/java/nu/marginalia/mq/persistence/MqPersistence.java +++ b/code/libraries/message-queue/src/main/java/nu/marginalia/mq/persistence/MqPersistence.java @@ -482,7 +482,7 @@ public class MqPersistence { // Keep 72 hours of messages var setToDead = conn.prepareStatement(""" DELETE FROM MESSAGE_QUEUE - WHERE STATE IN ('OK', 'DEAD') + WHERE STATE IN ('OK', 'DEAD', 'NEW') AND (TTL IS NULL OR TTL = 0) AND TIMESTAMPDIFF(SECOND, UPDATED_TIME, CURRENT_TIMESTAMP(6)) > 72*3600 """)) {