From 62f6318edf685abcea8a7d0d77d79b8140f81a53 Mon Sep 17 00:00:00 2001 From: Arseny Smirnov Date: Wed, 7 Aug 2019 18:13:45 +0300 Subject: [PATCH] TQueue: delete on_pop GitOrigin-RevId: f412be72f585ba19e9cdfcc2b30151f297beb761 --- tddb/td/db/TQueue.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tddb/td/db/TQueue.cpp b/tddb/td/db/TQueue.cpp index fdd1bc160..d9865d7e7 100644 --- a/tddb/td/db/TQueue.cpp +++ b/tddb/td/db/TQueue.cpp @@ -91,12 +91,6 @@ class TQueueImpl : public TQueue { q.events.push(std::move(raw_event)); } - void on_pop(int64 logevent_id) { - if (callback_) { - callback_->pop(logevent_id); - } - } - EventId push(QueueId queue_id, string data, double expire_at, EventId new_id = EventId()) override { auto &q = queues_[queue_id]; EventId event_id; @@ -192,7 +186,9 @@ class TQueueImpl : public TQueue { void confirm_read(Queue &q, EventId till_id) { while (!q.events.empty() && q.events.front().event_id.value() < till_id.value()) { - on_pop(q.events.front().logevent_id); + if (callback_) { + callback_->pop(q.events.front().logevent_id); + } q.events.pop(); } }