(control) Also clean up stale 'NEW' messages
This commit is contained in:
parent
ce5ae1931d
commit
a1df9e886a
@ -482,7 +482,7 @@ public class MqPersistence {
|
|||||||
// Keep 72 hours of messages
|
// Keep 72 hours of messages
|
||||||
var setToDead = conn.prepareStatement("""
|
var setToDead = conn.prepareStatement("""
|
||||||
DELETE FROM MESSAGE_QUEUE
|
DELETE FROM MESSAGE_QUEUE
|
||||||
WHERE STATE IN ('OK', 'DEAD')
|
WHERE STATE IN ('OK', 'DEAD', 'NEW')
|
||||||
AND (TTL IS NULL OR TTL = 0)
|
AND (TTL IS NULL OR TTL = 0)
|
||||||
AND TIMESTAMPDIFF(SECOND, UPDATED_TIME, CURRENT_TIMESTAMP(6)) > 72*3600
|
AND TIMESTAMPDIFF(SECOND, UPDATED_TIME, CURRENT_TIMESTAMP(6)) > 72*3600
|
||||||
""")) {
|
""")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user