aboutsummaryrefslogtreecommitdiffhomepage
path: root/td/telegram/StoryDb.cpp
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2025-05-14 13:32:14 +0300
committerlevlam <levlam@telegram.org>2025-05-14 13:32:14 +0300
commitdb5284470fb7113f0fefb9b685b1852cd6f51b48 (patch)
tree5a2c42c4f86553502b5fcb89cc2f733559132301 /td/telegram/StoryDb.cpp
parente55e678ff4a5ec23a542460a45e0e6b1b5cc2651 (diff)
Improve constant names.
Diffstat (limited to 'td/telegram/StoryDb.cpp')
-rw-r--r--td/telegram/StoryDb.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/td/telegram/StoryDb.cpp b/td/telegram/StoryDb.cpp
index c15c29d20..61f7a8f7c 100644
--- a/td/telegram/StoryDb.cpp
+++ b/td/telegram/StoryDb.cpp
@@ -516,8 +516,8 @@ class StoryDbAsync final : public StoryDbAsyncInterface {
std::shared_ptr<StoryDbSyncSafeInterface> sync_db_safe_;
StoryDbSyncInterface *sync_db_ = nullptr;
- static constexpr size_t MAX_PENDING_QUERIES_COUNT{50};
- static constexpr double MAX_PENDING_QUERIES_DELAY{0.01};
+ static constexpr size_t MAX_PENDING_QUERY_COUNT{50};
+ static constexpr double MAX_PENDING_QUERY_DELAY{0.01};
//NB: order is important, destructor of pending_writes_ will change finished_writes_
vector<Promise<Unit>> finished_writes_;
@@ -527,11 +527,11 @@ class StoryDbAsync final : public StoryDbAsyncInterface {
template <class F>
void add_write_query(F &&f) {
pending_writes_.push_back(PromiseCreator::lambda(std::forward<F>(f)));
- if (pending_writes_.size() > MAX_PENDING_QUERIES_COUNT) {
+ if (pending_writes_.size() > MAX_PENDING_QUERY_COUNT) {
do_flush();
wakeup_at_ = 0;
} else if (wakeup_at_ == 0) {
- wakeup_at_ = Time::now_cached() + MAX_PENDING_QUERIES_DELAY;
+ wakeup_at_ = Time::now_cached() + MAX_PENDING_QUERY_DELAY;
}
if (wakeup_at_ != 0) {
set_timeout_at(wakeup_at_);