diff options
| author | levlam <levlam@telegram.org> | 2025-05-14 13:32:14 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2025-05-14 13:32:14 +0300 |
| commit | db5284470fb7113f0fefb9b685b1852cd6f51b48 (patch) | |
| tree | 5a2c42c4f86553502b5fcb89cc2f733559132301 /tddb | |
| parent | e55e678ff4a5ec23a542460a45e0e6b1b5cc2651 (diff) | |
Improve constant names.
Diffstat (limited to 'tddb')
| -rw-r--r-- | tddb/td/db/SqliteKeyValueAsync.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tddb/td/db/SqliteKeyValueAsync.cpp b/tddb/td/db/SqliteKeyValueAsync.cpp index 8d705d8f7..6af444e22 100644 --- a/tddb/td/db/SqliteKeyValueAsync.cpp +++ b/tddb/td/db/SqliteKeyValueAsync.cpp @@ -108,8 +108,8 @@ class SqliteKeyValueAsync final : public SqliteKeyValueAsyncInterface { std::shared_ptr<SqliteKeyValueSafe> kv_safe_; SqliteKeyValue *kv_ = nullptr; - static constexpr double MAX_PENDING_QUERIES_DELAY = 0.01; - static constexpr size_t MAX_PENDING_QUERIES_COUNT = 100; + static constexpr double MAX_PENDING_QUERY_DELAY = 0.01; + static constexpr size_t MAX_PENDING_QUERY_COUNT = 100; FlatHashMap<string, optional<string>> buffer_; vector<Promise<Unit>> buffer_promises_; size_t cnt_ = 0; @@ -123,9 +123,9 @@ class SqliteKeyValueAsync final : public SqliteKeyValueAsyncInterface { if (!force) { auto now = Time::now_cached(); if (wakeup_at_ == 0) { - wakeup_at_ = now + MAX_PENDING_QUERIES_DELAY; + wakeup_at_ = now + MAX_PENDING_QUERY_DELAY; } - if (now < wakeup_at_ && cnt_ < MAX_PENDING_QUERIES_COUNT) { + if (now < wakeup_at_ && cnt_ < MAX_PENDING_QUERY_COUNT) { set_timeout_at(wakeup_at_); return; } |
