Drop only one week old empty queues from TQueue.
GitOrigin-RevId: b7ce4c1b4471cfa385ca4d268e8e052db0896ef3
This commit is contained in:
parent
70534a8aca
commit
692b0f18df
|
@ -219,7 +219,7 @@ class TQueueImpl : public TQueue {
|
||||||
size_t deleted_events = 0;
|
size_t deleted_events = 0;
|
||||||
for (auto &e : it->second.events.as_mutable_span()) {
|
for (auto &e : it->second.events.as_mutable_span()) {
|
||||||
if (e.expires_at < now) {
|
if (e.expires_at < now) {
|
||||||
pop(it->second, it->first, e, EventId());
|
pop(it->second, it->first, e, e.expires_at < now - 7 * 86400 ? EventId() : it->second.tail_id);
|
||||||
deleted_events++;
|
deleted_events++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user